{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.sportops.it/formato/schema/stagioni.schema.json",
  "title": "Stagioni sportive",
  "description": "Le stagioni configurate. Le altre entità citano la stagione per nome (es. «2026-2027»).",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Identificativo."
      },
      "nome": {
        "type": [
          "string",
          "null"
        ],
        "description": "Nome della stagione, es. «2026-2027». È la chiave usata dalle altre entità."
      },
      "inizio": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "description": "Primo giorno."
      },
      "fine": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "description": "Ultimo giorno."
      },
      "attiva": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "Stagione in corso."
      }
    },
    "required": [
      "id",
      "nome",
      "inizio",
      "fine",
      "attiva"
    ],
    "additionalProperties": false
  }
}