{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://schema.twindev.org/gaia-x-loire/GaiaXLegalPerson",
	"title": "GaiaXLegalPerson",
	"description": "A Legal Person as defined by Gaia-X.",
	"type": "object",
	"properties": {
		"type": {
			"const": "LegalPerson",
			"description": "JSON-LD type."
		},
		"registrationNumber": {
			"$ref": "https://schema.twindev.org/gaia-x-loire/GaiaXRegistrationNumber",
			"description": "The legal registration number."
		},
		"legalName": {
			"type": "string",
			"description": "The legal name."
		},
		"legalAddress": {
			"$ref": "https://schema.twindev.org/gaia-x-loire/GaiaXAddress",
			"description": "Legal Address"
		},
		"headquartersAddress": {
			"$ref": "https://schema.twindev.org/gaia-x-loire/GaiaXAddress",
			"description": "Headquarters address."
		},
		"parentOrganizationOf": {
			"type": "array",
			"items": {
				"allOf": [
					{
						"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
					},
					{
						"type": "object",
						"properties": {
							"id": {
								"type": "string"
							},
							"type": {
								"const": "LegalPerson"
							}
						},
						"required": ["id", "type"]
					}
				]
			},
			"description": "Parent organization."
		},
		"subOrganizationOf": {
			"type": "array",
			"items": {
				"allOf": [
					{
						"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
					},
					{
						"type": "object",
						"properties": {
							"id": {
								"type": "string"
							},
							"type": {
								"const": "LegalPerson"
							}
						},
						"required": ["id", "type"]
					}
				]
			},
			"description": "Sub organization of."
		}
	},
	"required": ["type", "registrationNumber", "legalName", "legalAddress"],
	"allOf": [
		{
			"$ref": "https://schema.twindev.org/gaia-x-loire/GaiaXEntity"
		}
	]
}
