{
   "$schema": "https://json-schema.org/draft/2019-09/schema",
   "$id":"TKCat_BE_collection_1.0",
	"title": "BE collection",
	"type": "object",
	"description": "Collection of biological entity (BE) concepts",
	"properties": {
      "$schema": {"enum": ["TKCat_BE_collection_1.0"]},
      "$id": {"type": "string"},
		"collection": {"enum":["BE"]},
		"resource": {"type": "string"},
		"tables": {
			"type": "array",
			"minItems": 1,
			"items":{
				"type": "object",
				"properties":{
					"name": {"type": "string"},
					"fields": {
						"type": "object",
						"properties": {
							"be": {
								"type": "object",
								"properties": {
									"static": {"type": "boolean"},
									"value": {"type": "string"}
								},
								"required": ["static", "value"],
								"additionalProperties": false
							},
							"source": {
								"type": "object",
								"properties": {
									"static": {"type": "boolean"},
									"value": {"type": "string"}
								},
								"required": ["static", "value"],
								"additionalProperties": false
							},
							"organism": {
								"type": "object",
								"properties": {
									"static": {"type": "boolean"},
									"value": {"type": "string"},
									"type": {"enum": ["Scientific name", "NCBI taxon identifier"]}
								},
								"required": ["static", "value", "type"],
								"additionalProperties": false
							},
							"identifier": {
								"type": "object",
								"properties": {
									"static": {"type": "boolean"},
									"value": {"type": "string"}
								},
								"required": ["static", "value"],
								"additionalProperties": false
							}
						},
						"required": ["be", "source", "identifier"],
						"additionalProperties": false
					}
				},
				"required": ["name", "fields"],
				"additionalProperties": false
			}
		}
	},
	"required": ["$schema", "$id", "collection", "resource", "tables"],
	"additionalProperties": false
}
