{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.opencityitalia.it/website/comuni/channel/v1.json",
  "title": "Canale",
  "description": "Canale di comunicazione o sportello digitale di 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)"
    },
    "subject": {
      "title": "Oggetto",
      "type": "string",
      "maxLength": 255
    },
    "channel_type": {
      "title": "Tipo canale",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "channel_url": {
      "title": "URL canale",
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "abstract": {
      "title": "Descrizione",
      "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",
    "subject",
    "tenant_id",
    "created_at",
    "updated_at"
  ]
}
