{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/worldcastr-com/json-schema/worldcastr-com-data-source-record-schema.json",
  "title": "DataSourceRecord",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/worldcastr-com-openapi.json#/components/schemas/DataSourceRecord",
  "type": "object",
  "required": [
    "source_id",
    "source_name",
    "source_family",
    "source_group",
    "source_tier",
    "source_status",
    "panel_status",
    "authority",
    "official_url",
    "official_urls",
    "license_status",
    "sensitivity",
    "geography",
    "resolution",
    "cadence",
    "format",
    "raw_retention",
    "normalization",
    "panels",
    "targets",
    "public_readiness",
    "training_eligibility",
    "provenance_id",
    "evidence_file",
    "notes",
    "access",
    "_links"
  ],
  "properties": {
    "source_id": {
      "type": "string"
    },
    "source_name": {
      "type": "string"
    },
    "source_family": {
      "type": "string"
    },
    "source_group": {
      "type": "string"
    },
    "source_tier": {
      "type": "string"
    },
    "source_status": {
      "type": "string"
    },
    "panel_status": {
      "type": "string"
    },
    "authority": {
      "type": "string"
    },
    "official_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "official_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "license_status": {
      "type": "string"
    },
    "sensitivity": {
      "type": "string",
      "enum": [
        "low",
        "medium",
        "high"
      ]
    },
    "geography": {
      "type": "string"
    },
    "resolution": {
      "type": "string"
    },
    "cadence": {
      "type": "string"
    },
    "temporal_start": {
      "type": [
        "string",
        "null"
      ]
    },
    "temporal_end": {
      "type": [
        "string",
        "null"
      ]
    },
    "format": {
      "type": "string"
    },
    "raw_retention": {
      "type": "string"
    },
    "normalization": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "panels": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "targets": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "public_readiness": {
      "type": "string"
    },
    "training_eligibility": {
      "type": "string",
      "enum": [
        "benchmark_only",
        "consumer_feed",
        "training_candidate",
        "holdback"
      ]
    },
    "provenance_id": {
      "type": "string"
    },
    "evidence_file": {
      "type": "string"
    },
    "notes": {
      "type": "string"
    },
    "payload_availability": {
      "$ref": "#/$defs/DataPayloadAvailability"
    },
    "access": {
      "$ref": "#/$defs/DataAccessSummary"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "DataAccessSummary": {
      "type": "object",
      "required": [
        "visibility",
        "support_level",
        "sensitivity",
        "training_eligibility",
        "license_status"
      ],
      "properties": {
        "visibility": {
          "type": "string",
          "enum": [
            "public",
            "metadata_only",
            "restricted",
            "unavailable"
          ]
        },
        "support_level": {
          "type": "string"
        },
        "sensitivity": {
          "type": "string"
        },
        "training_eligibility": {
          "type": "string",
          "enum": [
            "benchmark_only",
            "consumer_feed",
            "training_candidate",
            "holdback"
          ]
        },
        "license_status": {
          "type": "string"
        }
      }
    },
    "DataPayloadAvailability": {
      "type": "object",
      "required": [
        "level",
        "metadata_available",
        "sample_rows",
        "queryable_rows",
        "bulk_download",
        "runtime_verification",
        "reason"
      ],
      "properties": {
        "level": {
          "type": "string",
          "enum": [
            "metadata_only",
            "sample_rows",
            "queryable_rows",
            "bulk_download",
            "restricted",
            "unavailable"
          ]
        },
        "metadata_available": {
          "type": "boolean"
        },
        "sample_rows": {
          "type": "boolean"
        },
        "queryable_rows": {
          "type": "boolean"
        },
        "bulk_download": {
          "type": "boolean"
        },
        "runtime_verification": {
          "type": "string",
          "enum": [
            "contract_declared"
          ]
        },
        "reason": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  }
}