{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://schema.twindev.org/gaia-x-loire/GaiaXDataResource",
	"title": "GaiaXDataResource",
	"description": "A Data Resource as defined by Gaia-X.\nSee also W3C DCAT Dataset https://www.w3.org/TR/vocab-dcat-3/.",
	"type": "object",
	"properties": {
		"@context": {
			"$ref": "https://schema.twindev.org/gaia-x-loire/GaiaXContextType",
			"description": "The LD Context"
		},
		"id": {
			"type": "string",
			"description": "Subject Id"
		},
		"type": {
			"const": "DataResource",
			"description": "Subject type"
		},
		"name": {
			"type": "string",
			"description": "The Resource Name"
		},
		"exposedThrough": {
			"anyOf": [
				{
					"$ref": "https://schema.twindev.org/gaia-x-loire/GaiaXDataExchangeComponent"
				},
				{
					"type": "string"
				},
				{
					"allOf": [
						{
							"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
						},
						{
							"type": "object",
							"properties": {
								"id": {
									"type": "string"
								},
								"type": {
									"const": "DataExchangeComponent"
								}
							},
							"required": ["id", "type"]
						}
					]
				}
			],
			"description": "Exposed through a Data Exchange Component.\n'string' in case just an Id pointing to the Data Exchange Component is supplied\nthe third case covers the idiom where a JSON-LD Node is supplied with id and type."
		},
		"producedBy": {
			"anyOf": [
				{
					"$ref": "https://schema.twindev.org/gaia-x-loire/GaiaXLegalPerson"
				},
				{
					"type": "string"
				}
			],
			"description": "Who is the data producer"
		},
		"license": {
			"type": "string",
			"description": "Pointer (URL) to the license"
		},
		"copyrightOwnedBy": {
			"anyOf": [
				{
					"$ref": "https://schema.twindev.org/gaia-x-loire/GaiaXLegalPerson"
				},
				{
					"type": "string"
				}
			],
			"description": "Copyright owner"
		},
		"resourcePolicy": {
			"anyOf": [
				{
					"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPolicy"
				},
				{
					"type": "array",
					"items": {
						"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPolicy"
					}
				}
			],
			"description": "ODRL Policy"
		}
	},
	"required": [
		"@context",
		"id",
		"type",
		"name",
		"exposedThrough",
		"producedBy",
		"license",
		"copyrightOwnedBy",
		"resourcePolicy"
	],
	"allOf": [
		{
			"$ref": "https://schema.twindev.org/gaia-x-loire/GaiaXEntity"
		}
	]
}
