{
  "openapi": "3.1.0",
  "info": {
    "title": "Información pública de Beosmotic",
    "version": "1.0.0",
    "description": "API pública de solo lectura. Devuelve los documentos oficiales publicados, sin autenticación. Los precios incluyen IVA. No permite contratar, reservar, pagar ni consultar datos privados.",
    "contact": { "name": "Beosmotic", "url": "https://www.beosmotic.com/#contacto" }
  },
  "servers": [{ "url": "https://www.beosmotic.com" }],
  "externalDocs": { "url": "https://www.beosmotic.com/agents.md" },
  "security": [],
  "paths": {
    "/agent/v1": {
      "get": {
        "operationId": "getBeosmoticPublicApiIndex",
        "summary": "Consultar la documentación y los recursos de la API pública",
        "responses": {
          "200": {
            "description": "Índice del servicio público.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["name", "documentationUrl", "openapiUrl", "resources"],
                  "properties": {
                    "name": { "type": "string" },
                    "documentationUrl": { "type": "string", "format": "uri" },
                    "openapiUrl": { "type": "string", "format": "uri" },
                    "resources": { "type": "array", "items": { "type": "string", "format": "uri" } }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/agent/v1/overview": {
      "get": {
        "operationId": "getBeosmoticOverview",
        "summary": "Consultar servicios, modalidades, cobertura y contacto",
        "responses": {
          "200": { "$ref": "#/components/responses/PublicDocument" },
          "503": { "$ref": "#/components/responses/Unavailable" }
        }
      }
    },
    "/agent/v1/pricing": {
      "get": {
        "operationId": "getBeosmoticPricing",
        "summary": "Consultar el catálogo y los precios con IVA publicados",
        "description": "Incluye condiciones de suscripción, compra y mantenimiento. RO Moon se envía sin instalación. Confirmar condiciones y fechas con Beosmotic antes de contratar.",
        "responses": {
          "200": { "$ref": "#/components/responses/PublicDocument" },
          "503": { "$ref": "#/components/responses/Unavailable" }
        }
      }
    },
    "/agent/v1/health": {
      "get": {
        "operationId": "getBeosmoticPublicServiceHealth",
        "summary": "Comprobar que los documentos públicos y la ficha MCP están disponibles",
        "responses": {
          "200": {
            "description": "El servicio puede leer sus fuentes públicas.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["status", "version"],
                  "properties": { "status": { "const": "ok" }, "version": { "type": "string" } },
                  "additionalProperties": false
                }
              }
            }
          },
          "503": { "$ref": "#/components/responses/Unavailable" }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PublicDocument": {
        "type": "object",
        "required": ["sourceUrl", "contentType", "content"],
        "properties": {
          "sourceUrl": { "type": "string", "format": "uri", "description": "Fuente pública oficial del contenido." },
          "contentType": { "const": "text/markdown" },
          "content": { "type": "string", "description": "Contenido íntegro del documento Markdown publicado, leído en cada petición." }
        },
        "additionalProperties": false
      }
    },
    "responses": {
      "PublicDocument": {
        "description": "Documento público oficial de Beosmotic.",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicDocument" } } }
      },
      "Unavailable": {
        "description": "El contenido público no está disponible temporalmente. Reintentar más tarde.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": ["error"],
              "properties": { "error": { "type": "string" } },
              "additionalProperties": false
            }
          }
        }
      }
    }
  }
}
