{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openfutureforum.github.io/executive-intelligence-index/schema/release.schema.json",
  "title": "Release",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "release_id",
    "semantic_version",
    "schema_version",
    "data_version",
    "content_version",
    "release_date",
    "included_batch_ids",
    "included_record_counts",
    "checksums",
    "release_fingerprint",
    "known_limitations",
    "changelog",
    "approval_status",
    "provenance"
  ],
  "properties": {
    "release_id": {
      "type": "string",
      "minLength": 1
    },
    "semantic_version": {
      "type": "string",
      "minLength": 1
    },
    "schema_version": {
      "type": "string",
      "minLength": 1
    },
    "data_version": {
      "type": "string",
      "minLength": 1
    },
    "content_version": {
      "type": "string",
      "minLength": 1
    },
    "release_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "included_batch_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "included_record_counts": {
      "type": "object"
    },
    "checksums": {
      "type": "object"
    },
    "release_fingerprint": {
      "type": "string",
      "minLength": 1
    },
    "upstream_crosswalk_versions": {
      "type": "object"
    },
    "known_limitations": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "changelog": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "approval_status": {
      "type": "string",
      "minLength": 1
    },
    "workflow_status": {
      "$ref": "common.schema.json#/$defs/workflowStatus"
    },
    "machine_review_status": {
      "$ref": "common.schema.json#/$defs/machineReviewStatus"
    },
    "human_review_status": {
      "$ref": "common.schema.json#/$defs/humanReviewStatus"
    },
    "reviewed_by": {
      "type": [
        "string",
        "null"
      ]
    },
    "reviewed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "provenance": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "common.schema.json#/$defs/provenance"
      }
    },
    "revision_history": {
      "type": "array",
      "items": {
        "$ref": "common.schema.json#/$defs/revision"
      }
    }
  }
}
