{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://iarpg.com/country-context-source-record.schema.json",
  "title": "IARPG Country Context Source Record",
  "description": "An individually addressable metadata and claim-support record for one current public source. External page content is linked rather than copied.",
  "type": "object",
  "required": [
    "$schema",
    "record_type",
    "schema_version",
    "release",
    "version",
    "source_record_id",
    "proposal_id",
    "country",
    "region",
    "claim_ids",
    "source_identity",
    "source_title",
    "source_url",
    "source_type",
    "perspective_origin",
    "original_language",
    "working_language",
    "translation_method",
    "publication_date",
    "publication_date_note",
    "access_date",
    "geographic_scope",
    "institutional_scope",
    "claim_support",
    "confidence",
    "review_state",
    "content_preservation",
    "correction_status",
    "supersedes_source_record_ids",
    "superseded_by",
    "updated_utc"
  ],
  "properties": {
    "$schema": {
      "const": "https://iarpg.com/country-context-source-record.schema.json"
    },
    "record_type": {
      "const": "iarpg-country-context-source-record"
    },
    "schema_version": {
      "const": "1.0"
    },
    "release": {
      "const": "IARPG-OPS-2"
    },
    "version": {
      "const": "2.0.22-wip"
    },
    "source_record_id": {
      "type": "string",
      "pattern": "^source-[a-z0-9-]+$"
    },
    "proposal_id": {
      "type": "string"
    },
    "country": {
      "type": "string"
    },
    "region": {
      "type": "string"
    },
    "claim_ids": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "source_identity": {
      "type": "string"
    },
    "source_title": {
      "type": "string"
    },
    "source_url": {
      "type": "string",
      "format": "uri"
    },
    "source_type": {
      "type": "string"
    },
    "perspective_origin": {
      "enum": [
        "local",
        "affected-community",
        "regional",
        "external",
        "official-self-report"
      ]
    },
    "original_language": {
      "type": "string"
    },
    "working_language": {
      "type": "string"
    },
    "translation_method": {
      "type": "string"
    },
    "publication_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "publication_date_note": {
      "type": "string",
      "minLength": 1
    },
    "access_date": {
      "type": "string",
      "format": "date"
    },
    "geographic_scope": {
      "type": "string"
    },
    "institutional_scope": {
      "type": "string"
    },
    "claim_support": {
      "type": "object",
      "required": [
        "support_type",
        "locator",
        "scope_note"
      ],
      "properties": {
        "support_type": {
          "enum": [
            "direct",
            "partial",
            "contextual",
            "contradictory",
            "unresolved"
          ]
        },
        "locator": {
          "type": "string"
        },
        "scope_note": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "confidence": {
      "enum": [
        "high",
        "moderate",
        "low",
        "contested",
        "not-established"
      ]
    },
    "review_state": {
      "enum": [
        "unreviewed",
        "source-checked",
        "claim-checked",
        "second-review",
        "rejected"
      ]
    },
    "content_preservation": {
      "type": "string"
    },
    "correction_status": {
      "type": "string"
    },
    "supersedes_source_record_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "superseded_by": {
      "type": [
        "string",
        "null"
      ]
    },
    "updated_utc": {
      "type": "string",
      "format": "date-time"
    }
  },
  "additionalProperties": true
}
