{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://avds.digital/data/schemas/datapackage.schema.json",
  "title": "qz.energy Data Package descriptor",
  "type": "object",
  "required": [
    "profile",
    "name",
    "title",
    "version",
    "created",
    "resources",
    "qz_contract",
    "qz_product_id",
    "qz_release_id"
  ],
  "properties": {
    "profile": { "const": "data-package" },
    "name": { "type": "string", "minLength": 1 },
    "title": { "type": "string", "minLength": 1 },
    "description": { "type": "string" },
    "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
    "created": { "type": "string", "format": "date-time" },
    "homepage": { "type": "string", "format": "uri" },
    "schema": { "type": "string", "format": "uri" },
    "licenses": { "type": "array" },
    "contributors": { "type": "array" },
    "qz_contract": { "const": "qz.energy.datapackage/v1" },
    "qz_product_id": { "const": "qz-energy" },
    "qz_release_id": { "type": "string", "pattern": "^v[0-9]+\\.[0-9]+\\.[0-9]+-.+" },
    "qz_generated_at": { "type": "string", "format": "date-time" },
    "qz_source_manifest": { "type": "string", "minLength": 1 },
    "qz_public_boundary": { "type": "string", "minLength": 1 },
    "resources": {
      "type": "array",
      "minItems": 1,
      "items": { "$ref": "qz-energy-resource.schema.json" }
    }
  }
}
