From 1964f3902b3520006b411d64bb14befd1ffacbb2 Mon Sep 17 00:00:00 2001 From: Jose Manuel Cantera Date: Tue, 20 Nov 2018 17:06:31 +0100 Subject: [PATCH] Entity Fragment --- schema/Entity.json | 52 ++++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/schema/Entity.json b/schema/Entity.json index 6e2339e..022e2e4 100644 --- a/schema/Entity.json +++ b/schema/Entity.json @@ -142,16 +142,9 @@ ] } }, - "Entity": { + "EntityFragment": { "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" - }, "@context": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext" }, @@ -163,12 +156,6 @@ }, "operationSpace": { "$ref": "#/definitions/GeoProperty" - }, - "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": [ @@ -192,11 +179,36 @@ "type": "string", "pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$" } + }, + "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" + } + } + }, + { + "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/EntityFragment" + } + ] } }, - "allOf": [ - { - "$ref": "#/definitions/Entity" - } - ] -} \ No newline at end of file + "allOf": [ + { + "$ref": "#/definitions/Entity" + } + ] +} -- GitLab