{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.opencityitalia.it/website/comuni/public_person/v1.json",
  "title": "Persona pubblica",
  "description": "Persona che ricopre un ruolo pubblico in un comune (politici, dirigenti, dipendenti). I campi elencati sono il contratto minimo garantito; tenant con moduli opzionali possono esporre campi aggiuntivi.",
  "type": "object",
  "properties": {
    "id": {
      "title": "Identificativo",
      "type": "string",
      "description": "Identificativo composito nel formato tenantId:objectId (es. bugliano:228)"
    },
    "given_name": {
      "title": "Nome",
      "type": "string",
      "maxLength": 255
    },
    "family_name": {
      "title": "Cognome",
      "type": "string",
      "maxLength": 255
    },
    "abstract": {
      "title": "Descrizione breve",
      "type": [
        "string",
        "null"
      ]
    },
    "bio": {
      "title": "Biografia",
      "type": [
        "string",
        "null"
      ]
    },
    "competencies": {
      "title": "Competenze",
      "type": [
        "string",
        "null"
      ]
    },
    "delegations": {
      "title": "Deleghe",
      "type": [
        "string",
        "null"
      ]
    },
    "tenant_id": {
      "title": "Ente",
      "type": "string",
      "format": "uuid"
    },
    "created_at": {
      "title": "Data creazione",
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "title": "Data aggiornamento",
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "given_name",
    "family_name",
    "tenant_id",
    "created_at",
    "updated_at"
  ]
}
