{
  "openapi": "3.1.0",
  "info": {
    "title": "Giornata Mondiale - risorse pubbliche",
    "version": "1.0.0",
    "description": "Contratto delle risorse pubbliche, in sola lettura, esposte da giornatamondiale.it per crawler e agenti."
  },
  "servers": [
    {
      "url": "https://giornatamondiale.it",
      "description": "Sito pubblico canonico"
    }
  ],
  "paths": {
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsIndex",
        "summary": "Indice editoriale per modelli linguistici",
        "responses": {
          "200": {
            "description": "Indice Markdown",
            "content": {
              "text/plain": {
                "schema": { "type": "string" }
              }
            }
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "operationId": "getLlmsCorpus",
        "summary": "Corpus editoriale completo per modelli linguistici",
        "responses": {
          "200": {
            "description": "Corpus Markdown",
            "content": {
              "text/plain": {
                "schema": { "type": "string" }
              }
            }
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "operationId": "getXmlSitemap",
        "summary": "Indice XML delle pagine pubbliche",
        "responses": {
          "200": {
            "description": "Sitemap XML",
            "content": {
              "application/xml": {
                "schema": { "type": "string" }
              }
            }
          }
        }
      }
    },
    "/sitemap.md": {
      "get": {
        "operationId": "getMarkdownSitemap",
        "summary": "Indice Markdown delle sezioni principali",
        "responses": {
          "200": {
            "description": "Sitemap Markdown",
            "content": {
              "text/markdown": {
                "schema": { "type": "string" }
              }
            }
          }
        }
      }
    },
    "/feed.xml": {
      "get": {
        "operationId": "getRssFeed",
        "summary": "Feed RSS degli aggiornamenti editoriali",
        "responses": {
          "200": {
            "description": "Feed RSS",
            "content": {
              "application/rss+xml": {
                "schema": { "type": "string" }
              }
            }
          }
        }
      }
    },
    "/dati/giornate-mondiali.json": {
      "get": {
        "operationId": "getWorldDaysDatasetJson",
        "summary": "Dataset delle giornate mondiali con metadati",
        "responses": {
          "200": {
            "description": "Dataset JSON, schema versione 1.1",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["schema_version", "record_count", "data"],
                  "properties": {
                    "schema_version": { "type": "string" },
                    "record_count": { "type": "integer" },
                    "generated_at": { "type": "string", "format": "date-time" },
                    "data": { "type": "array", "items": { "type": "object" } }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/dati/giornate-mondiali.csv": {
      "get": {
        "operationId": "getWorldDaysDatasetCsv",
        "summary": "Dataset tabellare delle giornate mondiali",
        "responses": {
          "200": {
            "description": "CSV UTF-8",
            "content": {
              "text/csv": { "schema": { "type": "string" } }
            }
          }
        }
      }
    },
    "/dati/osservatorio-giornate-mondiali.json": {
      "get": {
        "operationId": "getWorldDaysObservatory",
        "summary": "Report aggregato su verifica e distribuzione delle giornate mondiali",
        "responses": {
          "200": {
            "description": "Report JSON, schema versione 1.1",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["schema_version", "total_records", "authority_status", "monthly_distribution"],
                  "properties": {
                    "schema_version": { "type": "string" },
                    "generated_at": { "type": "string", "format": "date-time" },
                    "total_records": { "type": "integer" },
                    "reviewed_records": { "type": "integer" },
                    "review_coverage_percent": { "type": "number" },
                    "authority_status": { "type": "object" },
                    "monthly_distribution": { "type": "array", "items": { "type": "object" } },
                    "institutional_distribution": { "type": "array", "items": { "type": "object" } },
                    "topic_distribution": { "type": "array", "items": { "type": "object" } },
                    "promoter_distribution": { "type": "array", "items": { "type": "object" } },
                    "new_records_last_90_days": { "type": "object" },
                    "upcoming_90_days": { "type": "object" },
                    "correction_history": { "type": "array", "items": { "type": "object" } }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/dati/osservatorio-giornate-mondiali.csv": {
      "get": {
        "operationId": "getWorldDaysObservatoryCsv",
        "summary": "Statistiche dell'Osservatorio per mese, tema, promotore e finestra temporale",
        "responses": {
          "200": {
            "description": "CSV UTF-8 aggregato",
            "content": {
              "text/csv": { "schema": { "type": "string" } }
            }
          }
        }
      }
    },
    "/dati/calendario-editoriale-90-giorni.csv": {
      "get": {
        "operationId": "getWorldDaysEditorialCalendar",
        "summary": "Calendario editoriale delle prossime ricorrenze in una finestra di 90 giorni",
        "responses": {
          "200": {
            "description": "CSV UTF-8 con date, status, temi, promotori e fonti",
            "content": {
              "text/csv": { "schema": { "type": "string" } }
            }
          }
        }
      }
    },
    "/calendar/feed.ics": {
      "get": {
        "operationId": "getWorldDaysCalendar",
        "summary": "Calendario iCalendar sottoscrivibile",
        "responses": {
          "200": {
            "description": "Calendario RFC 5545",
            "content": {
              "text/calendar": { "schema": { "type": "string" } }
            }
          }
        }
      }
    }
  }
}
