{
  "openapi": "3.1.0",
  "info": {
    "title": "Air Warrior Argentina Public API",
    "version": "1.1.0",
    "description": "API pública de solo lectura para consultar información institucional, contactos y parámetros técnicos publicados del proyecto Air Warrior Argentina. Las respuestas anuncian límites de uso y los errores siguen RFC 9457.",
    "contact": {
      "name": "Gerencia Administrativa",
      "email": "florencia.lorca@airwarrior.com.ar",
      "url": "https://airwarriorarg.com.ar/contact"
    }
  },
  "servers": [
    { "url": "https://airwarriorarg.com.ar", "description": "Sitio público de Air Warrior Argentina" }
  ],
  "tags": [
    { "name": "Institutional", "description": "Información institucional pública." },
    { "name": "Technical", "description": "Parámetros técnicos públicos de las configuraciones informadas." }
  ],
  "paths": {
    "/api/v1/overview": {
      "get": {
        "operationId": "getAirWarriorProjectOverview",
        "summary": "Obtener el resumen del proyecto",
        "description": "Devuelve la identidad, el alcance territorial, los destinatarios y el enlace para coordinar una presentación.",
        "tags": ["Institutional"],
        "responses": {
          "200": {
            "description": "Resumen institucional público.",
            "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimitPolicy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Overview" } } }
          },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "500": { "$ref": "#/components/responses/InternalServerError" }
        }
      }
    },
    "/api/v1/contacts": {
      "get": {
        "operationId": "listAirWarriorInstitutionalContacts",
        "summary": "Listar los contactos institucionales",
        "description": "Devuelve los correos públicos y el área responsable de cada contacto.",
        "tags": ["Institutional"],
        "responses": {
          "200": {
            "description": "Directorio institucional público.",
            "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimitPolicy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" } },
            "content": { "application/json": { "schema": { "type": "object", "required": ["contacts"], "properties": { "contacts": { "type": "array", "items": { "$ref": "#/components/schemas/Contact" } } } } } }
          },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "500": { "$ref": "#/components/responses/InternalServerError" }
        }
      }
    },
    "/api/v1/technical-summary": {
      "get": {
        "operationId": "getAirWarriorTechnicalSummary",
        "summary": "Consultar un resumen técnico",
        "description": "Devuelve los parámetros técnicos publicados para la configuración contra incendios o para la configuración de carga.",
        "tags": ["Technical"],
        "parameters": [
          {
            "name": "configuration",
            "in": "query",
            "required": true,
            "description": "Configuración que se desea consultar.",
            "schema": { "type": "string", "enum": ["fire", "cargo"] }
          }
        ],
        "responses": {
          "200": {
            "description": "Resumen técnico de la configuración seleccionada.",
            "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimitPolicy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" } },
            "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/FireTechnicalSummary" }, { "$ref": "#/components/schemas/CargoTechnicalSummary" } ] } } }
          },
          "400": { "$ref": "#/components/responses/InvalidParameter" },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "500": { "$ref": "#/components/responses/InternalServerError" }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Overview": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name", "legalName", "description", "country", "serviceArea", "intendedFor", "presentationCoordination", "website"],
        "properties": {
          "name": { "type": "string", "description": "Nombre público del proyecto." },
          "legalName": { "type": "string", "description": "Razón social publicada." },
          "description": { "type": "string", "description": "Descripción institucional breve." },
          "country": { "type": "string", "description": "País de cobertura informado." },
          "serviceArea": { "type": "string", "description": "Alcance territorial informado." },
          "intendedFor": { "type": "array", "items": { "type": "string" }, "description": "Tipos de instituciones destinatarias." },
          "presentationCoordination": { "type": "string", "format": "uri", "description": "Página de contacto para coordinar una presentación." },
          "website": { "type": "string", "format": "uri", "description": "Sitio oficial." }
        }
      },
      "Contact": {
        "type": "object",
        "additionalProperties": false,
        "required": ["area", "email"],
        "properties": {
          "area": { "type": "string", "description": "Área institucional." },
          "email": { "type": "string", "format": "email", "description": "Correo publicado del área." }
        }
      },
      "FireTechnicalSummary": {
        "type": "object",
        "additionalProperties": true,
        "required": ["configuration", "heightMeters", "flowLitersPerMinuteMinimum", "flowLitersPerMinuteMaximum", "autonomyMinutes", "payloadKilograms", "restrictions"],
        "properties": {
          "configuration": { "type": "string" },
          "heightMeters": { "type": "number" },
          "flowLitersPerMinuteMinimum": { "type": "number" },
          "flowLitersPerMinuteMaximum": { "type": "number" },
          "autonomyMinutes": { "type": "number" },
          "payloadKilograms": { "type": "number" },
          "payloadWindBeaufort": { "type": "number" },
          "windBeaufortMaximum": { "type": "number" },
          "windHeightMeters": { "type": "number" },
          "nozzlePressureKilogramsPerSquareCentimeterMaximum": { "type": "number" },
          "cisternLitersMinimum": { "type": "number" },
          "cisternLitersMaximum": { "type": "number" },
          "restrictions": { "type": "array", "items": { "type": "string" } }
        }
      },
      "CargoTechnicalSummary": {
        "type": "object",
        "additionalProperties": true,
        "required": ["configuration", "heightMeters", "autonomyMinutesAtFullLoad", "maximumTakeoffWeightKilograms", "automaticHooks", "fixedHooks", "precautions"],
        "properties": {
          "configuration": { "type": "string" },
          "heightMeters": { "type": "number" },
          "heightNote": { "type": "string" },
          "autonomyMinutesAtFullLoad": { "type": "number" },
          "maximumTakeoffWeightKilograms": { "type": "number" },
          "automaticHooks": { "type": "object", "additionalProperties": false, "required": ["count", "kilogramsPerHook", "totalKilograms"], "properties": { "count": { "type": "integer" }, "kilogramsPerHook": { "type": "number" }, "totalKilograms": { "type": "number" } } },
          "fixedHooks": { "type": "object", "additionalProperties": false, "required": ["count", "kilogramsPerHook", "totalKilograms"], "properties": { "count": { "type": "integer" }, "kilogramsPerHook": { "type": "number" }, "totalKilograms": { "type": "number" } } },
          "windBeaufortMaximum": { "type": "number" },
          "precautions": { "type": "array", "items": { "type": "string" } }
        }
      },
      "Problem": {
        "type": "object",
        "additionalProperties": false,
        "description": "Detalle de problema conforme a RFC 9457 con extensiones para código y resolución.",
        "required": ["type", "title", "status", "detail", "instance", "code", "resolution"],
        "properties": {
          "type": { "type": "string", "format": "uri-reference", "description": "Identificador del tipo de problema." },
          "title": { "type": "string", "description": "Resumen estable del problema." },
          "status": { "type": "integer", "minimum": 400, "maximum": 599, "description": "Estado HTTP." },
          "detail": { "type": "string", "description": "Explicación específica de la falla." },
          "instance": { "type": "string", "format": "uri-reference", "description": "Ruta de la solicitud." },
          "code": { "type": "string", "description": "Código estable legible por máquinas." },
          "resolution": { "type": "string", "description": "Sugerencia para resolver la falla." }
        }
      }
    },
    "headers": {
      "RateLimitPolicy": { "description": "Política de cuota de la API pública según el borrador IETF RateLimit Fields for HTTP.", "schema": { "type": "string", "example": "\"public-api\";q=120;w=60" } },
      "RateLimit": { "description": "Cuota restante y segundos hasta la siguiente ventana.", "schema": { "type": "string", "example": "\"public-api\";r=119;t=60" } },
      "RetryAfter": { "description": "Segundos que el cliente debe esperar antes de reintentar.", "schema": { "type": "integer", "minimum": 1 } }
    },
    "responses": {
      "InvalidParameter": {
        "description": "Parámetro inválido.",
        "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimitPolicy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" } },
        "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } }
      },
      "MethodNotAllowed": {
        "description": "Método no permitido.",
        "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimitPolicy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" } },
        "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } }
      },
      "RateLimited": {
        "description": "Límite temporal de solicitudes excedido.",
        "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimitPolicy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "Retry-After": { "$ref": "#/components/headers/RetryAfter" } },
        "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } }
      },
      "InternalServerError": {
        "description": "Error interno inesperado.",
        "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimitPolicy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" } },
        "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } }
      }
    }
  }
}
