{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/northkoreahub-com/json-schema/northkoreahub-com-access-table-schema.json",
  "title": "AccessTable",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/northkoreahub-com-openapi.yml#/components/schemas/AccessTable",
  "type": "object",
  "properties": {
    "dataset": {
      "type": "string"
    },
    "site": {
      "type": "string",
      "format": "uri"
    },
    "method": {
      "type": "string"
    },
    "status_key": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "last_verified": {
      "type": "string",
      "format": "date"
    },
    "entries": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AccessEntry"
      }
    }
  },
  "required": [
    "dataset",
    "entries",
    "last_verified"
  ],
  "$defs": {
    "AccessEntry": {
      "type": "object",
      "properties": {
        "nationality": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "restricted",
            "suspended",
            "banned"
          ],
          "description": "restricted = entry possible under limited arrangements; suspended = previously possible, currently paused; banned = barred by the DPRK or by the traveller's own government."
        },
        "summary": {
          "type": "string"
        },
        "basis": {
          "type": "string",
          "description": "Legal or operational basis for the status"
        },
        "sources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Source"
          }
        },
        "last_verified": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "nationality",
        "status",
        "summary",
        "basis",
        "sources",
        "last_verified"
      ]
    },
    "Source": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Source publication or institution name"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "name",
        "url"
      ]
    }
  }
}