{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "TIANSIGHT report edition",
  "type": "object",
  "required": [
    "id",
    "sourceId",
    "title",
    "originalTitle",
    "publisher",
    "year",
    "publishedDate",
    "dataPeriod",
    "summary",
    "contents",
    "topics",
    "regions",
    "language",
    "access",
    "landingUrl",
    "directDownloadUrl",
    "downloadMode",
    "downloadFormat",
    "verifiedAt",
    "evidence",
    "seriesLabel"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "sourceId": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "originalTitle": {
      "type": "string"
    },
    "publisher": {
      "type": "string"
    },
    "year": {
      "type": "integer",
      "description": "Edition label year; may differ from publication or data year."
    },
    "publishedDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "dataPeriod": {
      "type": [
        "string",
        "null"
      ]
    },
    "summary": {
      "type": "string"
    },
    "contents": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "topics": {
      "type": "array",
      "items": {
        "enum": [
          "market",
          "consumer",
          "menu",
          "operations",
          "location",
          "supply",
          "procurement"
        ]
      }
    },
    "regions": {
      "type": "array",
      "items": {
        "enum": [
          "global",
          "cn",
          "us",
          "eu",
          "asia",
          "other"
        ]
      }
    },
    "language": {
      "enum": [
        "en",
        "zh",
        "multi"
      ]
    },
    "access": {
      "enum": [
        "open",
        "partial",
        "paid"
      ]
    },
    "landingUrl": {
      "type": "string",
      "format": "uri"
    },
    "directDownloadUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "downloadFormat": {
      "enum": [
        "pdf",
        "html",
        "xlsx",
        "csv",
        null
      ]
    },
    "downloadMode": {
      "enum": [
        "direct",
        "landing",
        "registration",
        "subscription"
      ]
    },
    "verifiedAt": {
      "type": "string",
      "format": "date"
    },
    "evidence": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "url",
          "note"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "note": {
            "type": "string"
          }
        }
      }
    },
    "seriesLabel": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
