{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "/data/schema.json",
  "title": "PCT static site read model v1.0.0",
  "description": "Derived presentation contract. Canonical editions retain their original schemas. Null regional values mean unavailable.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "edition_date",
    "status",
    "delivery",
    "benchmarks",
    "articles"
  ],
  "properties": {
    "schema_version": {
      "const": "1.0.0"
    },
    "edition_date": {
      "type": "string",
      "format": "date"
    },
    "status": {
      "const": "public_editorial_archive"
    },
    "delivery": {
      "const": "static_snapshot"
    },
    "benchmarks": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "articles": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "title",
          "content_type",
          "publication_date",
          "observation_date",
          "html_url",
          "json_url",
          "sources_count",
          "provenance"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "content_type": {
            "type": "string"
          },
          "publication_date": {
            "type": "string"
          },
          "observation_date": {
            "type": "string"
          },
          "html_url": {
            "type": "string"
          },
          "json_url": {
            "type": "string"
          },
          "sources_count": {
            "type": "integer",
            "minimum": 0
          },
          "provenance": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "edition_url",
              "json_pointer"
            ],
            "properties": {
              "edition_url": {
                "type": "string",
                "pattern": "^/data/editions/"
              },
              "json_pointer": {
                "type": "string",
                "pattern": "^/"
              }
            }
          }
        }
      }
    }
  }
}
