From 836c42ba703f6861ec2b983cd089629392072f2d Mon Sep 17 00:00:00 2001 From: Jose Manuel Cantera Date: Tue, 18 Dec 2018 13:01:21 +0100 Subject: [PATCH] Now examples validate against schema --- schema/Entity.json | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/schema/Entity.json b/schema/Entity.json index 7b7fb4f..4455074 100644 --- a/schema/Entity.json +++ b/schema/Entity.json @@ -156,6 +156,19 @@ }, "operationSpace": { "$ref": "#/definitions/GeoProperty" + }, + "id": { + "type": "string", + "format": "uri" + }, + "type": { + "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name" + }, + "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": { @@ -179,29 +192,13 @@ "Entity": { "allOf": [ { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name" - }, - "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" - } - }, "required": [ "id", "type" ] }, { - "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/EntityFragment" + "$ref": "#/definitions/EntityFragment" } ] } -- GitLab