{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/chinafootnotes-com/json-schema/chinafootnotes-com-update-list-schema.json",
  "title": "UpdateList",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/chinafootnotes-com-openapi.yml#/components/schemas/UpdateList",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "notice": {
      "type": "string"
    },
    "updates": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Update"
      }
    }
  },
  "required": [
    "updates"
  ],
  "$defs": {
    "Source": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "null only for our own checks, which have no web page: kind owner_tested (we tried it ourselves; first-hand, not official) or owner_official (the venue's own answer: method phone, onsite_sign or onsite_notice; official). accessedAt is the day we checked."
        },
        "title": {
          "type": "string"
        },
        "publisher": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "official",
            "government"
          ]
        },
        "method": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "phone",
            "onsite_sign",
            "onsite_notice",
            null
          ],
          "description": "Only for kind owner_official: how we got the venue’s answer (by phone, a standing sign on site, or a temporary notice on site)."
        },
        "contact": {
          "type": [
            "string",
            "null"
          ],
          "description": "Only for method phone: who we called (venue and number)."
        },
        "accessedAt": {
          "type": "string",
          "format": "date"
        },
        "publishedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        }
      },
      "required": [
        "id",
        "url",
        "title",
        "publisher",
        "kind",
        "accessedAt"
      ]
    },
    "Update": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "publishedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "reviewedAt": {
          "type": "string",
          "format": "date"
        },
        "startsAt": {
          "type": "string",
          "format": "date"
        },
        "expiresAt": {
          "type": "string",
          "format": "date"
        },
        "sourceIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "placeId": {
          "type": "string"
        },
        "sources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Source"
          }
        }
      },
      "required": [
        "id",
        "text",
        "publishedAt",
        "reviewedAt",
        "startsAt",
        "expiresAt",
        "sourceIds"
      ]
    }
  }
}