{
  "openapi": "3.1.0",
  "info": {
    "title": "Movvia public content catalog",
    "version": "1.0.0",
    "description": "Read-only catalog of the Movvia institutional site for AI agents. This is not a payment or toll API and does not issue credentials.",
    "contact": {
      "name": "Movvia",
      "email": "comercial@movvia.com.br",
      "url": "https://www.movvia.com.br/contato"
    },
    "license": {
      "name": "Content available from the site",
      "url": "https://www.movvia.com.br/privacidade"
    }
  },
  "servers": [
    { "url": "https://www.movvia.com.br", "description": "Canonical production host" },
    { "url": "https://site-movvia.vercel.app", "description": "Current Vercel deployment" }
  ],
  "tags": [
    { "name": "pages", "description": "Public HTML/markdown pages" }
  ],
  "paths": {
    "/api/v1/pages": {
      "get": {
        "operationId": "listPages",
        "tags": ["pages"],
        "summary": "List public pages",
        "description": "Returns the catalog of public institutional pages. No authentication.",
        "responses": {
          "200": {
            "description": "Catalog",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Catalog" }
              },
              "text/markdown": {
                "schema": { "type": "string" }
              }
            }
          }
        }
      }
    },
    "/api/v1/pages/{slug}": {
      "get": {
        "operationId": "getPage",
        "tags": ["pages"],
        "summary": "Get one page",
        "description": "Returns a page as JSON or markdown depending on Accept. Use slug `home` for the homepage.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Page slug (`home`, `quem-somos`, `about`, `pagamentos`, …)",
            "schema": { "type": "string", "minLength": 1 }
          }
        ],
        "responses": {
          "200": {
            "description": "Page body",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Page" }
              },
              "text/markdown": {
                "schema": { "type": "string" }
              }
            }
          },
          "404": {
            "description": "Unknown slug",
            "content": {
              "application/problem+json": {
                "schema": { "$ref": "#/components/schemas/Problem" }
              }
            }
          },
          "406": {
            "description": "No acceptable representation",
            "content": {
              "text/plain": { "schema": { "type": "string" } }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenApi",
        "tags": ["pages"],
        "summary": "This OpenAPI document",
        "description": "Machine-readable description of the content catalog.",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document",
            "content": {
              "application/json": { "schema": { "type": "object" } }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "tags": ["pages"],
        "summary": "Agent index",
        "description": "When-to-use guidance and links for language models.",
        "responses": {
          "200": {
            "description": "Plain-text agent index",
            "content": { "text/plain": { "schema": { "type": "string" } } }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Catalog": {
        "type": "object",
        "required": ["name", "pages"],
        "properties": {
          "name": { "type": "string" },
          "description": { "type": "string" },
          "pages": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/CatalogItem" }
          }
        }
      },
      "CatalogItem": {
        "type": "object",
        "required": ["slug", "path", "title"],
        "properties": {
          "slug": { "type": "string" },
          "path": { "type": "string" },
          "title": { "type": "string" },
          "description": { "type": "string" },
          "markdown": { "type": "string" }
        }
      },
      "Page": {
        "type": "object",
        "required": ["slug", "path", "title", "markdown"],
        "properties": {
          "slug": { "type": "string" },
          "path": { "type": "string" },
          "title": { "type": "string" },
          "description": { "type": "string" },
          "markdown": { "type": "string" }
        }
      },
      "Problem": {
        "type": "object",
        "required": ["title", "status", "code"],
        "properties": {
          "type": { "type": "string", "format": "uri" },
          "title": { "type": "string" },
          "status": { "type": "integer" },
          "detail": { "type": "string" },
          "code": { "type": "string" },
          "instance": { "type": "string" },
          "resolution": { "type": "string" }
        }
      }
    }
  }
}
