{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.sportops.it/formato/schema/rose.schema.json",
  "title": "Rose",
  "description": "Chi gioca in quale squadra, con ruolo e numero di maglia.",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "squadra_id": {
        "type": [
          "integer",
          "null"
        ],
        "description": "→ squadre.id"
      },
      "atleta_id": {
        "type": [
          "integer",
          "null"
        ],
        "description": "→ atleti.id"
      },
      "ruolo": {
        "type": [
          "string",
          "null"
        ],
        "description": "Codice del ruolo in campo secondo lo sport (es. portiere, difensore, centrocampista, attaccante)."
      },
      "posizione": {
        "type": [
          "string",
          "null"
        ],
        "description": "Posizione, se indicata."
      },
      "numero_maglia": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Numero di maglia."
      },
      "attivo": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "In rosa."
      }
    },
    "required": [
      "squadra_id",
      "atleta_id",
      "ruolo",
      "posizione",
      "numero_maglia",
      "attivo"
    ],
    "additionalProperties": false
  }
}