{
	"openapi": "3.1.0",
	"info": {
		"title": "NiroHelp public API",
		"version": "1.0.0",
		"description": "The unauthenticated routes of the nirohelp/v1 REST namespace, as served by the NiroHelp WordPress plugin running this site's own docs and tickets at nirohelp.com/docs. Every other route in the namespace requires a logged-in session plus a wp_rest nonce and is not documented here — see the developer reference.",
		"termsOfService": "https://nirohelp.com/docs/developers/rest-api-reference/"
	},
	"externalDocs": {
		"description": "Full REST API reference, including authenticated routes",
		"url": "https://nirohelp.com/docs/developers/rest-api-reference/"
	},
	"servers": [
		{ "url": "https://nirohelp.com/wp-json/nirohelp/v1" }
	],
	"paths": {
		"/docs/": {
			"get": {
				"summary": "List published docs",
				"parameters": [
					{ "name": "s", "in": "query", "schema": { "type": "string" }, "description": "Search term" },
					{ "name": "count", "in": "query", "schema": { "type": "integer" }, "description": "Clamped by the nirohelp_docs_api_max_per_page filter (default max 100)" }
				],
				"responses": {
					"200": { "description": "Array of doc objects" }
				}
			}
		},
		"/docs/{id}": {
			"get": {
				"summary": "Get a single published doc",
				"parameters": [
					{ "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } }
				],
				"responses": {
					"200": { "description": "A doc object" },
					"404": { "description": "Not found" }
				}
			}
		},
		"/docs/product/{product}": {
			"get": {
				"summary": "List published docs for a product term",
				"parameters": [
					{ "name": "product", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Product taxonomy term slug" }
				],
				"responses": {
					"200": { "description": "Array of doc objects" }
				}
			}
		},
		"/tickets/": {
			"post": {
				"summary": "File a support ticket",
				"description": "The one write route open to anonymous callers; no nonce required.",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": ["title", "description"],
								"properties": {
									"title": { "type": "string" },
									"description": { "type": "string" },
									"name": { "type": "string" },
									"email": { "type": "string", "format": "email" }
								}
							}
						}
					}
				},
				"responses": {
					"201": { "description": "The created ticket" }
				}
			}
		},
		"/tickets/products/": {
			"get": { "summary": "List ticket product terms", "responses": { "200": { "description": "Array of terms" } } }
		},
		"/tickets/reasons/": {
			"get": { "summary": "List ticket reason terms", "responses": { "200": { "description": "Array of terms" } } }
		},
		"/tickets/urgencies/": {
			"get": { "summary": "List ticket urgency levels", "responses": { "200": { "description": "Array of levels" } } }
		}
	}
}
