From 1ae83e120f73f70d2209d4f8c7d34e2e555d5e3e Mon Sep 17 00:00:00 2001 From: Jose Manuel Cantera Date: Wed, 7 Nov 2018 10:21:12 +0100 Subject: [PATCH] Subscriptions finished --- schema/Subscription.json | 33 +++++++++++++++++++++++++++------ schema/common.json | 3 ++- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/schema/Subscription.json b/schema/Subscription.json index b4762d4..d8abaea 100644 --- a/schema/Subscription.json +++ b/schema/Subscription.json @@ -11,8 +11,10 @@ "type": "array", "minItems": 1, "items": { - "type": "string" - } + "type": "string", + "minLength": 1 + }, + "uniqueItems": true }, "format": { "type": "string" @@ -140,7 +142,8 @@ "type": "array", "minItems": 1, "items": { - "type": "string" + "type": "string", + "minLength": 1 }, "uniqueItems": true }, @@ -180,8 +183,26 @@ "modifiedAt": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/modifiedAt" }, - "required": [ - "id", - "type" + "allOf": [ + { + "required": [ + "id", + "type" + ] + }, + { + "anyOf": [ + { + "required": [ + "entities" + ] + }, + { + "required": [ + "watchedAttributes" + ] + } + ] + } ] } diff --git a/schema/common.json b/schema/common.json index 05e41db..9e34157 100644 --- a/schema/common.json +++ b/schema/common.json @@ -76,7 +76,8 @@ "type": "string", "format": "regex" } - } + }, + "required": ["type"] } } } -- GitLab