{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.opencityitalia.it/website/comuni/public_project/v1.json",
  "title": "Progetto",
  "description": "Progetto pubblico finanziato o promosso 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)"
    },
    "alternative_name": {
      "title": "Sottotitolo",
      "type": [
        "string",
        "null"
      ]
    },
    "identifier": {
      "title": "CUP / Codice progetto",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "title": "Descrizione",
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "title": "Stato avanzamento",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "status_notes": {
      "title": "Note avanzamento",
      "type": [
        "string",
        "null"
      ]
    },
    "published_date": {
      "title": "Data pubblicazione",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "budget": {
      "title": "Importo finanziato",
      "description": "ezprice: oggetto con value (numero), vat_id e is_vat_included.",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "value": {
          "type": [
            "number",
            "null"
          ]
        },
        "vat_id": {
          "type": [
            "integer",
            "null"
          ]
        },
        "is_vat_included": {
          "type": [
            "integer",
            "null"
          ]
        }
      }
    },
    "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"
    },
    "title": {
      "title": "Titolo",
      "type": "string",
      "maxLength": 255
    }
  },
  "required": [
    "id",
    "title",
    "tenant_id",
    "created_at",
    "updated_at"
  ]
}
