{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.opencityitalia.it/website/comuni/dataset/v1.json",
  "title": "Dataset",
  "description": "Dataset open data pubblicato da un comune. 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)"
    },
    "title": {
      "title": "Titolo",
      "type": "string",
      "maxLength": 255
    },
    "abstract": {
      "title": "Sommario",
      "type": [
        "string",
        "null"
      ]
    },
    "theme": {
      "title": "Tema",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "format": {
      "title": "Formato",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "license": {
      "title": "Licenza",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "modified_date": {
      "title": "Data modifica",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "issued_date": {
      "title": "Data emissione",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "accrual_periodicity": {
      "title": "Periodicità aggiornamento",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "download_url": {
      "title": "URL download",
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "identifier": {
      "title": "Identificativo dataset",
      "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",
    "title",
    "tenant_id",
    "created_at",
    "updated_at"
  ]
}
