{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://avds.digital/data/schemas/qz-energy-resource.schema.json",
  "title": "qz.energy Data Package resource metadata",
  "type": "object",
  "required": [
    "name",
    "title",
    "path",
    "format",
    "mediatype",
    "bytes",
    "hash",
    "qz_dataset_id",
    "qz_domain",
    "qz_freshness_status",
    "qz_coverage_status",
    "qz_coverage_note",
    "qz_public_url",
    "qz_machine_url",
    "qz_schema_url"
  ],
  "properties": {
    "name": { "type": "string", "minLength": 1 },
    "title": { "type": "string", "minLength": 1 },
    "path": { "type": "string", "pattern": "^[^/].*" },
    "format": { "enum": ["json", "geojson", "ndjson"] },
    "mediatype": { "type": "string", "minLength": 1 },
    "bytes": { "type": "integer", "minimum": 0 },
    "hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
    "description": { "type": "string" },
    "qz_dataset_id": { "type": "string", "minLength": 1 },
    "qz_domain": { "type": "string", "minLength": 1 },
    "qz_period_coverage": { "type": "string", "minLength": 1 },
    "qz_granularity": { "type": "string", "minLength": 1 },
    "qz_unit_family": { "type": "string", "minLength": 1 },
    "qz_source_class": { "type": "string", "minLength": 1 },
    "qz_primary_source": { "type": "string", "minLength": 1 },
    "qz_freshness_status": { "type": "string", "minLength": 1 },
    "qz_coverage_status": { "type": "string", "minLength": 1 },
    "qz_coverage_note": { "type": "string", "minLength": 1 },
    "qz_counts": { "type": "object" },
    "qz_schema_hint": { "type": "string", "minLength": 1 },
    "qz_public_url": { "type": "string", "format": "uri" },
    "qz_machine_url": { "type": "string", "format": "uri" },
    "qz_schema_url": { "type": "string", "format": "uri" }
  },
  "additionalProperties": true
}
