{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openfutureforum.github.io/executive-intelligence-index/schema/topic.schema.json",
  "title": "Topic",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "topic_id",
    "preferred_label",
    "definition",
    "publication_thresholds",
    "review_status",
    "provenance"
  ],
  "properties": {
    "topic_id": {
      "type": "string",
      "minLength": 1
    },
    "preferred_label": {
      "type": "string",
      "minLength": 1
    },
    "aliases": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "definition": {
      "type": "string",
      "minLength": 1
    },
    "parent_topic_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "related_topic_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "exclusions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "examples": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "applicable_roles": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "publication_thresholds": {
      "type": "object"
    },
    "review_status": {
      "type": "string",
      "minLength": 1
    },
    "publication_status": {
      "type": [
        "string",
        "null"
      ]
    },
    "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"
      }
    }
  }
}
