{
  "openapi": "3.1.0",
  "info": {
    "title": "learntosail Search Index",
    "version": "1.0.0",
    "description": "A static, read-only JSON index of every course, lesson, exam, tool, guide, cheat sheet and glossary term on learntosail.io."
  },
  "servers": [{ "url": "https://learntosail.io" }],
  "paths": {
    "/search-index.json": {
      "get": {
        "summary": "Get the site search index",
        "operationId": "getSearchIndex",
        "responses": {
          "200": {
            "description": "Every searchable page on the site.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SearchItem" } }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SearchItem": {
        "type": "object",
        "required": ["k", "t", "u"],
        "properties": {
          "k": { "type": "string", "description": "Kind, such as Course, Lesson, Exam, Tool or Guide." },
          "t": { "type": "string", "description": "Title." },
          "u": { "type": "string", "description": "Site-relative URL of the page." },
          "d": { "type": "string", "description": "Short description." },
          "x": { "type": "string", "description": "Extra search keywords." }
        }
      }
    }
  }
}
