diff --git a/schema/Subscription.json b/schema/Subscription.json index b4762d4bed0626aabaaf19422161a6bfcd4f3f28..d8abaea52bc8c0a75efd4bb2fb59a701adebb5e9 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 05e41dbd9e9b898223ded76156b8760646724e29..9e3415710d3db558b8efd9eff79f637bd4cbb971 100644 --- a/schema/common.json +++ b/schema/common.json @@ -76,7 +76,8 @@ "type": "string", "format": "regex" } - } + }, + "required": ["type"] } } }