{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.opencityitalia.it/website/comuni/insight/v1.json",
  "title": "Approfondimento",
  "description": "Contenuto editoriale di approfondimento 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"
      ]
    },
    "body": {
      "title": "Corpo",
      "type": [
        "string",
        "null"
      ]
    },
    "published_date": {
      "title": "Data pubblicazione",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "deadline_date": {
      "title": "Data scadenza",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "topics": {
      "title": "Argomenti",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "tenantId:objectId"
          },
          "type_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "object_id": {
            "type": "string"
          },
          "remote_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "object_id"
        ]
      }
    },
    "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"
  ]
}
