{
  "openapi": "3.1.1",
  "info": {
    "title": "Auto public documentation API",
    "version": "1.0.0",
    "description": "Search and read public documentation. Does not manage or execute playbooks. No authentication required."
  },
  "servers": [
    {
      "url": "https://on.auto"
    }
  ],
  "security": [],
  "paths": {
    "/api/docs": {
      "get": {
        "operationId": "search_auto_docs",
        "summary": "Search Auto documentation",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 8
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published documentation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "title",
                      "url",
                      "path",
                      "markdownUrl",
                      "description"
                    ],
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "markdownUrl": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "markdown": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown page"
          }
        }
      }
    },
    "/api/docs/page": {
      "get": {
        "operationId": "read_auto_doc",
        "summary": "Read a published page as Markdown",
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 300
            },
            "example": "/docs/get-started/local"
          }
        ],
        "responses": {
          "200": {
            "description": "Published documentation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "title",
                    "url",
                    "path",
                    "markdownUrl",
                    "description"
                  ],
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "markdownUrl": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "markdown": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown page"
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "documentation_health",
        "summary": "Check documentation service availability",
        "responses": {
          "200": {
            "description": "Published documentation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "const": "ok"
                    },
                    "pages": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown page"
          }
        }
      }
    }
  }
}
