{
  "openapi": "3.1.0",
  "info": {
    "title": "MaximoFN Content API",
    "version": "1.0.0",
    "description": "API pública de solo lectura que expone el índice de contenido de maximofn.com (artículos, proyectos y tips sobre Inteligencia Artificial, Machine Learning y programación). No requiere autenticación. Pensada para crawlers, agentes de IA y desarrolladores que quieran descubrir el contenido del sitio de forma legible por máquinas.",
    "contact": {
      "name": "MaximoFN",
      "url": "https://www.maximofn.com"
    },
    "license": {
      "name": "Contenido © MaximoFN",
      "url": "https://www.maximofn.com"
    }
  },
  "servers": [
    { "url": "https://www.maximofn.com", "description": "Producción" }
  ],
  "paths": {
    "/api/content.json": {
      "get": {
        "operationId": "getContentIndex",
        "summary": "Índice de contenido del sitio",
        "description": "Devuelve el listado completo de artículos del blog, proyectos y tips, con título, descripción, imagen y URLs en los tres idiomas (es, en, pt-br).",
        "responses": {
          "200": {
            "description": "Índice de contenido",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ContentIndex" }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ContentIndex": {
        "type": "object",
        "properties": {
          "site": { "type": "string", "format": "uri" },
          "name": { "type": "string" },
          "description": { "type": "string" },
          "languages": { "type": "array", "items": { "type": "string" } },
          "generated": { "type": "string", "format": "date-time" },
          "documentation": { "type": "string", "format": "uri" },
          "openapi": { "type": "string", "format": "uri" },
          "sections": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/Section" }
          },
          "counts": {
            "type": "object",
            "properties": {
              "posts": { "type": "integer" },
              "projects": { "type": "integer" },
              "tips": { "type": "integer" },
              "total": { "type": "integer" }
            }
          },
          "content": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/ContentItem" }
          }
        },
        "required": ["site", "languages", "content"]
      },
      "Section": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "url": { "type": "string", "format": "uri" }
        }
      },
      "ContentItem": {
        "type": "object",
        "properties": {
          "type": { "type": "string", "enum": ["post", "project", "tip"] },
          "title": { "type": "string" },
          "description": { "type": "string" },
          "url": { "type": "string", "format": "uri", "description": "URL canónica (español)" },
          "url_en": { "type": "string", "format": "uri" },
          "url_pt": { "type": "string", "format": "uri" },
          "image": { "type": "string", "format": "uri" },
          "technologies": {
            "type": "array",
            "items": { "type": "string" },
            "description": "Solo presente en proyectos"
          }
        },
        "required": ["type", "title", "url"]
      }
    }
  }
}
