{
  "openapi": "3.1.0",
  "info": {
    "title": "AxisLibre Catalog API",
    "version": "1.0.0",
    "description": "Read-only search of curated AxisLibre resources and instructions. No general-web search."
  },
  "paths": {
    "/api/v1/health": {
      "get": {
        "operationId": "catalog_health",
        "responses": {
          "200": {
            "description": "Catalog health and count"
          },
          "503": {
            "description": "Catalog unavailable"
          }
        }
      }
    },
    "/api/v1/search": {
      "get": {
        "operationId": "catalog_search",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "directory",
                "resource",
                "prompt",
                "agent"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ranked catalog matches",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "string"
                    },
                    "scope": {
                      "type": "string"
                    },
                    "index_size": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query"
          },
          "503": {
            "description": "Unavailable"
          }
        }
      }
    }
  }
}
