From ccce71705a792c0cd83549f4426a80836eddfa98 Mon Sep 17 00:00:00 2001 From: Jose Manuel Cantera Date: Fri, 9 Nov 2018 10:10:13 +0100 Subject: [PATCH] Add Context Source Registration --- schema/ContextSourceRegistration.json | 117 ++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 schema/ContextSourceRegistration.json diff --git a/schema/ContextSourceRegistration.json b/schema/ContextSourceRegistration.json new file mode 100644 index 0000000..c4161e6 --- /dev/null +++ b/schema/ContextSourceRegistration.json @@ -0,0 +1,117 @@ +{ + "$schema": "http://json-schema.org/schema#", + "id": "https://uri.etsi.org/ngsi-ld/schema/ContextSourceRegistration.json", + "title": "NGSI-LD Context Source Registration", + "description": "NGSI-LD Context Source Registration", + "definitions": { + "RegistrationInfo": { + "type": "object", + "required": [ + "entities" + ], + "properties": { + "entities": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/EntityInfo" + } + }, + "properties": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "relationships": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "TimeInterval": { + "type": "object", + "required": [ + "start" + ], + "properties": { + "start": { + "type": "string", + "format": "date-time" + }, + "end": { + "type": "string", + "format": "date-time" + } + } + } + }, + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uri" + }, + "type": { + "type": "string", + "const": "ContextSourceRegistration" + }, + "@context": { + "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext" + }, + "information": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/RegistrationInfo" + } + }, + "timestamp": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/TimeInterval" + } + }, + "location": { + "$ref": "http://json-schema.org/geojson/geometry.json#" + }, + "expires": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "description": { + "type": "string", + "minLength": 1 + }, + "endpoint": { + "type": "string", + "format": "uri" + }, + "createdAt": { + "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/createdAt" + }, + "modifiedAt": { + "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/modifiedAt" + } + }, + "additionalProperties": { + "type": ["string", "number", "boolean", "array", "object"] + }, + "required": [ + "id", + "type", + "endpoint", + "information" + ] +} -- GitLab