{
  "openapi": "3.1.0",
  "info": {
    "title": "VoFactu Public Information API",
    "version": "1.0.0",
    "description": "Read-only public product information and service health. This API does not access VoFactu user accounts or documents."
  },
  "servers": [
    { "url": "https://vofactu.com" }
  ],
  "paths": {
    "/api/site-info": {
      "get": {
        "operationId": "getVofactuSiteInfo",
        "summary": "Get structured public information about VoFactu",
        "responses": {
          "200": {
            "description": "Public product information",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/SiteInfo" }
              }
            }
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "operationId": "getPublicApiHealth",
        "summary": "Check public information API health",
        "responses": {
          "200": {
            "description": "Service is available",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["status", "service"],
                  "properties": {
                    "status": { "type": "string", "const": "ok" },
                    "service": { "type": "string" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/pages.json": {
      "get": {
        "operationId": "listVofactuPublicPages",
        "summary": "List indexed public pages and their available representations",
        "responses": {
          "200": {
            "description": "Public page index",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/PageIndex" }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SiteInfo": {
        "type": "object",
        "required": ["name", "description", "audience", "features", "officialPages"],
        "properties": {
          "name": { "type": "string" },
          "description": { "type": "string" },
          "audience": { "type": "array", "items": { "type": "string" } },
          "features": { "type": "array", "items": { "type": "string" } },
          "officialPages": {
            "type": "object",
            "additionalProperties": { "type": "string", "format": "uri" }
          }
        }
      },
      "PageIndex": {
        "type": "object",
        "required": ["schemaVersion", "site", "total", "pages"],
        "properties": {
          "schemaVersion": { "type": "string" },
          "site": { "type": "string", "format": "uri" },
          "total": { "type": "integer", "minimum": 0 },
          "pages": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["url", "title", "type", "language", "representations"],
              "properties": {
                "url": { "type": "string", "format": "uri" },
                "title": { "type": "string" },
                "description": { "type": "string" },
                "type": { "type": "string" },
                "language": { "type": "string" },
                "representations": { "type": "object" }
              }
            }
          }
        }
      }
    }
  }
}
