{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/maximofn-com/json-schema/maximofn-com-content-index-schema.json",
  "title": "ContentIndex",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/maximofn-com-openapi.json#/components/schemas/ContentIndex",
  "type": "object",
  "properties": {
    "site": {
      "type": "string",
      "format": "uri"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "api_version": {
      "type": "string",
      "description": "Versión del contrato que sirve esta respuesta."
    },
    "versions": {
      "type": "object",
      "description": "Cómo está versionada esta API y a qué ruta conviene fijarse.",
      "properties": {
        "current": {
          "type": "string"
        },
        "latest_url": {
          "type": "string",
          "format": "uri",
          "description": "Alias sin versión, sigue siempre a la última."
        },
        "versioned_url": {
          "type": "string",
          "format": "uri",
          "description": "Ruta versionada, contrato estable."
        },
        "policy": {
          "type": "string"
        },
        "deprecation": {
          "type": "object",
          "description": "Política de retirada de versiones y estado actual.",
          "properties": {
            "policy": {
              "type": "string"
            },
            "minimum_support_months": {
              "type": "integer"
            },
            "deprecated_versions": {
              "type": "array",
              "description": "Versiones en periodo de retirada. Vacío mientras solo exista una.",
              "items": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "string"
                  },
                  "sunset": {
                    "type": "string",
                    "format": "date"
                  },
                  "successor": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              }
            }
          }
        }
      }
    },
    "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": "#/$defs/Section"
      }
    },
    "counts": {
      "type": "object",
      "properties": {
        "posts": {
          "type": "integer"
        },
        "projects": {
          "type": "integer"
        },
        "tips": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "content": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ContentItem"
      }
    }
  },
  "required": [
    "site",
    "languages",
    "content"
  ],
  "$defs": {
    "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"
      ]
    },
    "Section": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}