{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "foundry-races.json",
	"version": "1.2.0",
	"type": "object",
	"$defs": {
		"raceData": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"name": {
					"type": "string"
				},
				"source": {
					"$ref": "util.json#/$defs/source"
				},
				"identifier": {
					"$ref": "util-foundry.json#/$defs/foundryIdentifier"
				},
				"system": {
					"$ref": "util-foundry.json#/$defs/foundrySystemObject"
				},
				"activities": {
					"type": "array",
					"items": {
						"$ref": "util-foundry.json#/$defs/foundryActivityObject"
					}
				},
				"effects": {
					"type": "array",
					"items": {
						"$ref": "util-foundry.json#/$defs/foundryEffectObject"
					}
				},
				"flags": {
					"$ref": "util-foundry.json#/$defs/foundryFlagsObject"
				},
				"advice": {
					"$ref": "entry.json"
				},
				"img": {
					"type": "string"
				},
				"advancement": {
					"$ref": "util-foundry.json#/$defs/foundryAdvancementsArray"
				},
				"ignoreSrdActivities": {
					"const": true
				},
				"ignoreSrdEffects": {
					"const": true
				},
				"migrationVersion": {
					"type": "integer"
				},
				"_merge": {
					"$ref": "util-foundry.json#/$defs/foundryMergeObject"
				},
				"entryData": {
					"$ref": "util-foundry.json#/$defs/entryDataObject"
				}
			},
			"required": [
				"name",
				"source"
			]
		},
		"race": {
			"anyOf": [
				{
					"$ref": "#/$defs/raceData"
				},
				{
					"type": "object",
					"additionalProperties": false,
					"properties": {
						"name": {
							"type": "string"
						},
						"source": {
							"$ref": "util.json#/$defs/source"
						},
						"identifier": {
							"$ref": "util-foundry.json#/$defs/foundryIdentifier"
						},
						"system": {
							"$ref": "util-foundry.json#/$defs/foundrySystemObject"
						},
						"activities": {
							"type": "array",
							"items": {
								"$ref": "util-foundry.json#/$defs/foundryActivityObject"
							}
						},
						"effects": {
							"type": "array",
							"items": {
								"$ref": "util-foundry.json#/$defs/foundryEffectObject"
							}
						},
						"flags": {
							"$ref": "util-foundry.json#/$defs/foundryFlagsObject"
						},
						"advice": {
							"$ref": "entry.json"
						},
						"img": {
							"type": "string"
						},
						"advancement": {
							"$ref": "util-foundry.json#/$defs/foundryAdvancementsArray"
						},
						"ignoreSrdActivities": {
							"const": true
						},
						"ignoreSrdEffects": {
							"const": true
						},
						"migrationVersion": {
							"type": "integer"
						},
						"_merge": {
							"$ref": "util-foundry.json#/$defs/foundryMergeObject"
						},
						"entryData": {
							"$ref": "util-foundry.json#/$defs/entryDataObject"
						},
						"_copy": {
							"$ref": "util-copy.json#/$defs/copyBlock_copy_generic"
						}
					},
					"required": [
						"name",
						"source",
						"_copy"
					]
				}
			]
		},
		"raceFeatureData": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"name": {
					"type": "string"
				},
				"source": {
					"$ref": "util.json#/$defs/source"
				},
				"identifier": {
					"$ref": "util-foundry.json#/$defs/foundryIdentifier"
				},
				"system": {
					"$ref": "util-foundry.json#/$defs/foundrySystemObject"
				},
				"activities": {
					"type": "array",
					"items": {
						"$ref": "util-foundry.json#/$defs/foundryActivityObject"
					}
				},
				"effects": {
					"type": "array",
					"items": {
						"$ref": "util-foundry.json#/$defs/foundryEffectObject"
					}
				},
				"flags": {
					"$ref": "util-foundry.json#/$defs/foundryFlagsObject"
				},
				"advice": {
					"$ref": "entry.json"
				},
				"img": {
					"type": "string"
				},
				"advancement": {
					"$ref": "util-foundry.json#/$defs/foundryAdvancementsArray"
				},
				"ignoreSrdActivities": {
					"const": true
				},
				"ignoreSrdEffects": {
					"const": true
				},
				"migrationVersion": {
					"type": "integer"
				},
				"_merge": {
					"$ref": "util-foundry.json#/$defs/foundryMergeObject"
				},
				"raceName": {
					"description": "The full name of the race, with subrace parts/etc. applied.",
					"type": "string",
					"markdownDescription": "The full name of the race, with subrace parts/etc. applied."
				},
				"raceSource": {
					"description": "The source of the subrace or race.",
					"$ref": "util.json#/$defs/source",
					"markdownDescription": "The source of the subrace or race."
				}
			},
			"required": [
				"name",
				"source"
			]
		},
		"raceFeature": {
			"anyOf": [
				{
					"type": "object",
					"additionalProperties": false,
					"properties": {
						"name": {
							"type": "string"
						},
						"source": {
							"$ref": "util.json#/$defs/source"
						},
						"identifier": {
							"$ref": "util-foundry.json#/$defs/foundryIdentifier"
						},
						"system": {
							"$ref": "util-foundry.json#/$defs/foundrySystemObject"
						},
						"activities": {
							"type": "array",
							"items": {
								"$ref": "util-foundry.json#/$defs/foundryActivityObject"
							}
						},
						"effects": {
							"type": "array",
							"items": {
								"$ref": "util-foundry.json#/$defs/foundryEffectObject"
							}
						},
						"flags": {
							"$ref": "util-foundry.json#/$defs/foundryFlagsObject"
						},
						"advice": {
							"$ref": "entry.json"
						},
						"img": {
							"type": "string"
						},
						"advancement": {
							"$ref": "util-foundry.json#/$defs/foundryAdvancementsArray"
						},
						"ignoreSrdActivities": {
							"const": true
						},
						"ignoreSrdEffects": {
							"const": true
						},
						"migrationVersion": {
							"type": "integer"
						},
						"_merge": {
							"$ref": "util-foundry.json#/$defs/foundryMergeObject"
						},
						"raceName": {
							"description": "The full name of the race, with subrace parts/etc. applied.",
							"type": "string",
							"markdownDescription": "The full name of the race, with subrace parts/etc. applied."
						},
						"raceSource": {
							"description": "The source of the subrace or race.",
							"$ref": "util.json#/$defs/source",
							"markdownDescription": "The source of the subrace or race."
						}
					},
					"required": [
						"name",
						"source",
						"raceName",
						"raceSource"
					]
				},
				{
					"type": "object",
					"additionalProperties": false,
					"properties": {
						"name": {
							"type": "string"
						},
						"source": {
							"$ref": "util.json#/$defs/source"
						},
						"identifier": {
							"$ref": "util-foundry.json#/$defs/foundryIdentifier"
						},
						"system": {
							"$ref": "util-foundry.json#/$defs/foundrySystemObject"
						},
						"activities": {
							"type": "array",
							"items": {
								"$ref": "util-foundry.json#/$defs/foundryActivityObject"
							}
						},
						"effects": {
							"type": "array",
							"items": {
								"$ref": "util-foundry.json#/$defs/foundryEffectObject"
							}
						},
						"flags": {
							"$ref": "util-foundry.json#/$defs/foundryFlagsObject"
						},
						"advice": {
							"$ref": "entry.json"
						},
						"img": {
							"type": "string"
						},
						"advancement": {
							"$ref": "util-foundry.json#/$defs/foundryAdvancementsArray"
						},
						"ignoreSrdActivities": {
							"const": true
						},
						"ignoreSrdEffects": {
							"const": true
						},
						"migrationVersion": {
							"type": "integer"
						},
						"_merge": {
							"$ref": "util-foundry.json#/$defs/foundryMergeObject"
						},
						"raceName": {
							"description": "The full name of the race, with subrace parts/etc. applied.",
							"type": "string",
							"markdownDescription": "The full name of the race, with subrace parts/etc. applied."
						},
						"raceSource": {
							"description": "The source of the subrace or race.",
							"$ref": "util.json#/$defs/source",
							"markdownDescription": "The source of the subrace or race."
						},
						"_copy": {
							"$ref": "util-copy.json#/$defs/copyBlock_copy_generic"
						}
					},
					"required": [
						"name",
						"source",
						"_copy"
					]
				}
			]
		}
	},
	"properties": {
		"_meta": {
			"$ref": "util.json#/$defs/metaBlock"
		},
		"race": {
			"type": "array",
			"minItems": 1,
			"uniqueItems": true,
			"items": {
				"$ref": "#/$defs/race"
			}
		},
		"raceFeature": {
			"type": "array",
			"minItems": 1,
			"uniqueItems": true,
			"items": {
				"$ref": "#/$defs/raceFeature"
			}
		}
	},
	"required": [
		"race",
		"raceFeature"
	],
	"additionalProperties": false
}