{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://schema.twindev.org/gaia-x-loire/GaiaXServiceOffering",
	"title": "GaiaXServiceOffering",
	"description": "A Service offering",
	"type": "object",
	"properties": {
		"type": {
			"const": "ServiceOffering",
			"description": "Type"
		},
		"name": {
			"type": "string",
			"description": "Name of the Service Offering."
		},
		"providedBy": {
			"anyOf": [
				{
					"type": "string"
				},
				{
					"$ref": "https://schema.twindev.org/gaia-x-loire/GaiaXLegalPerson"
				},
				{
					"allOf": [
						{
							"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
						},
						{
							"type": "object",
							"properties": {
								"id": {
									"type": "string"
								},
								"type": {
									"const": "LegalPerson"
								}
							},
							"required": ["id", "type"]
						}
					]
				}
			],
			"description": "Participant that provides the offering"
		},
		"servicePolicy": {
			"anyOf": [
				{
					"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPolicy"
				},
				{
					"type": "array",
					"items": {
						"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPolicy"
					}
				}
			],
			"description": "ODRL policy associated to the service offering"
		},
		"aggregationOfResources": {
			"anyOf": [
				{
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				{
					"type": "array",
					"items": {
						"$ref": "https://schema.twindev.org/gaia-x-loire/GaiaXDataResource"
					}
				},
				{
					"allOf": [
						{
							"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
						},
						{
							"type": "object",
							"properties": {
								"id": {
									"type": "string"
								},
								"type": {
									"const": "DataResource"
								}
							},
							"required": ["id", "type"]
						}
					]
				}
			],
			"description": "Resources aggregated\nIt is supported different representations, inline,\nby reference both providing the URI or a partial JSON-LD Node object"
		},
		"endpoint": {
			"$ref": "https://schema.twindev.org/gaia-x-loire/GaiaXEndpoint",
			"description": "The endpoint"
		}
	},
	"required": ["type", "name", "providedBy", "servicePolicy"],
	"allOf": [
		{
			"$ref": "https://schema.twindev.org/gaia-x-loire/GaiaXEntity"
		}
	]
}
