{
  "components": {
    "headers": {
      "API-Version": {
        "description": "Version of the API that served the response.",
        "schema": {
          "example": "1.1.0",
          "type": "string"
        }
      },
      "Deprecation": {
        "description": "RFC 9745 deprecation timestamp when an endpoint is scheduled for replacement.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit-Limit": {
        "description": "Maximum number of requests permitted in the current rate-limit window.",
        "schema": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "RateLimit-Policy": {
        "description": "IETF RateLimit policy declaration (for example `600;w=60`).",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit-Remaining": {
        "description": "Number of requests remaining in the current rate-limit window.",
        "schema": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "RateLimit-Reset": {
        "description": "Seconds until the rate-limit quota resets.",
        "schema": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying after a 429 Too Many Requests response.",
        "schema": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "Sunset": {
        "description": "RFC 8594 HTTP-date after which a deprecated endpoint will be removed (at least 90 days notice).",
        "schema": {
          "type": "string"
        }
      }
    },
    "parameters": {
      "ApiVersion": {
        "description": "Requested API version label (defaults to the current stable version).",
        "in": "header",
        "name": "API-Version",
        "required": false,
        "schema": {
          "default": "1.1.0",
          "type": "string"
        }
      }
    },
    "schemas": {
      "ProblemDetails": {
        "properties": {
          "code": {
            "description": "Machine-readable error code.",
            "type": "string"
          },
          "detail": {
            "description": "Explanation of this specific error.",
            "type": "string"
          },
          "hint": {
            "description": "Actionable recovery guidance for callers.",
            "type": "string"
          },
          "status": {
            "description": "HTTP status code.",
            "type": "integer"
          },
          "title": {
            "description": "Short summary of the error.",
            "type": "string"
          },
          "type": {
            "description": "Stable URI identifying the error class.",
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "oauth2": {
        "description": "Least-privilege OAuth 2.1 scopes for authenticated operations; public read operations also accept anonymous requests.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://docs-demo.ferrite.run/oauth/authorize",
            "scopes": {
              "apps:discover": "Discover available operations, schemas, and public metadata.",
              "apps:read": "Read-only access to declared GET and read-only operations."
            },
            "tokenUrl": "https://docs-demo.ferrite.run/oauth/token"
          }
        },
        "type": "oauth2"
      }
    }
  },
  "info": {
    "description": "A demonstration copy of the Ferrite developer documentation, running as an application on Ferrite Alloy: the developer docs, the engineering blog, the changelog, the knowledge base and the academy courses, generated from the documentation site, which remains the reference. People and AI assistants can search it and read any page as Markdown, without an account.\n\nVersioning and deprecation policy: endpoints are versioned via URL path and the optional `API-Version` header (current version: 1.1.0). Deprecated endpoints emit RFC 9745 `Deprecation` and RFC 8594 `Sunset` response headers at least 90 days before removal. Rate limits are communicated via IETF `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`, `RateLimit-Policy`, and `Retry-After` headers.",
    "title": "alloy-docs",
    "version": "1.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/doc": {
      "get": {
        "operationId": "get_doc",
        "parameters": [
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "description": "the page path",
              "examples": [
                "/docs/store"
              ],
              "maxLength": 256,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "markdown": {
                      "description": "The page as Markdown, starting with its title.",
                      "type": "string"
                    },
                    "path": {
                      "description": "The page's own path, without a fragment.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "path",
                    "markdown"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Read one page of the documentation as Markdown. Use it with a path from search_docs, llms.txt or the sitemap when you need the whole page rather than a snippet. Returns the path and the page's full text, the same as its .md address serves.",
        "x-idempotent": true,
        "x-read-only": true
      }
    },
    "/api/search": {
      "get": {
        "operationId": "search_docs",
        "parameters": [
          {
            "in": "query",
            "name": "collection",
            "required": false,
            "schema": {
              "description": "search only this collection; leave out to search them all",
              "enum": [
                "docs",
                "blog",
                "changelog",
                "kb",
                "academy",
                "articles"
              ],
              "maxLength": 256,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "description": "the words to look for; a page must contain all of them",
              "examples": [
                "constrained app"
              ],
              "maxLength": 256,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "collection": {
                      "description": "The collection filter, or empty for all.",
                      "type": "string"
                    },
                    "hits": {
                      "items": {
                        "description": "One search hit.",
                        "properties": {
                          "collection": {
                            "description": "The collection the hit belongs to.",
                            "type": "string"
                          },
                          "context": {
                            "description": "The section/course/category the hit belongs to.",
                            "type": "string"
                          },
                          "heading": {
                            "description": "The heading nearest the match, when the match is inside a section.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "path": {
                            "type": "string"
                          },
                          "score": {
                            "type": "integer"
                          },
                          "snippet_html": {
                            "description": "An HTML snippet with every match wrapped in <mark>.",
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "collection",
                          "title",
                          "path",
                          "context",
                          "snippet_html",
                          "score"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "q": {
                      "type": "string"
                    },
                    "searched": {
                      "description": "How many documents were searched.",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "q",
                    "collection",
                    "hits",
                    "searched"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Search the text of every page in the docs, blog, changelog, knowledge base and academy. Use it to find the page that answers a question, then read that page with get_doc. Returns up to 20 results, best match first, each with the page path, the nearest heading and a snippet.",
        "x-idempotent": true,
        "x-read-only": true
      }
    }
  },
  "security": [
    {},
    {
      "oauth2": [
        "apps:discover",
        "apps:read"
      ]
    }
  ],
  "servers": [
    {
      "url": "https://docs-demo.ferrite.run"
    }
  ],
  "x-agent-card": "https://docs-demo.ferrite.run/.well-known/agent-card.json",
  "x-ard-catalog": "https://docs-demo.ferrite.run/.well-known/ard.json",
  "x-llms-txt": "https://docs-demo.ferrite.run/llms.txt",
  "x-mcp-endpoint": "https://docs-demo.ferrite.run/mcp",
  "x-webmcp": "https://docs-demo.ferrite.run/.well-known/webmcp.js"
}