Loading examples/SubscriptionList-example.json 0 → 100644 +37 −0 Original line number Diff line number Diff line [ { "id": "urn:ngsi-ld:Subscription:mySubscription", "type": "Subscription", "entities": [ { "type": "Vehicle" } ], "watchedAttributes": [ "speed" ], "q": "speed>50", "geoQ": { "georel": "near;maxDistance==2000", "geometry": "Point", "coordinates": [ -1, 100 ] }, "notification": { "attributes": [ "speed" ], "format": "keyValues", "endpoint": { "uri": "http://my.endpoint.org/notify", "accept": "application/json" } }, "@context": [ "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/coreContext/ngsi-ld-core-context.json", "http://example.org/cim/vehicle.jsonld" ] } ] schema/subscriptions/Subscription.json +111 −92 Original line number Diff line number Diff line Loading @@ -68,18 +68,10 @@ "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/geometry" } } } }, "SubscriptionFragment": { "type": "object", "properties": { "id": { "type": "string", "format": "uri" }, "type": { "type": "string", "const": "Subscription" }, "@context": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext" }, Loading @@ -98,9 +90,6 @@ "type": "string", "minLength": 1 }, "notification": { "$ref": "#/definitions/NotificationParams" }, "watchedAttributes": { "type": "array", "minItems": 1, Loading @@ -117,14 +106,6 @@ "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": [ "active", "paused", "expired" ] }, "isActive": { "type": "boolean" }, Loading @@ -141,12 +122,41 @@ "csf": { "type": "string" } } }, "Subscription": { "allOf": [ { "$ref": "#/definitions/SubscriptionFragment" }, { "type": "object", "properties": { "id": { "type": "string", "format": "uri" }, "type": { "type": "string", "const": "Subscription" }, "notification": { "$ref": "#/definitions/NotificationParams" }, "status": { "type": "string", "enum": [ "active", "paused", "expired" ] }, "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" } }, "allOf": [ { Loading @@ -171,3 +181,12 @@ } ] } ] } }, "allOf": [ { "$ref": "#/definitions/Subscription" } ] } schema/subscriptions/SubscriptionList.json 0 → 100644 +17 −0 Original line number Diff line number Diff line { "$schema": "http://json-schema.org/schema#", "id": "https://uri.etsi.org/ngsi-ld/schema/SubscriptionList.json", "title": "NGSI-LD Subscription List", "description": "NGSI-LD Subscription List", "definitions": { "SubscriptionList": { "type": "array", "items": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Subscription.json#/definitions/Subscription" } } }, "allOf": [{ "$ref": "#/definitions/SubscriptionList" }] } Loading
examples/SubscriptionList-example.json 0 → 100644 +37 −0 Original line number Diff line number Diff line [ { "id": "urn:ngsi-ld:Subscription:mySubscription", "type": "Subscription", "entities": [ { "type": "Vehicle" } ], "watchedAttributes": [ "speed" ], "q": "speed>50", "geoQ": { "georel": "near;maxDistance==2000", "geometry": "Point", "coordinates": [ -1, 100 ] }, "notification": { "attributes": [ "speed" ], "format": "keyValues", "endpoint": { "uri": "http://my.endpoint.org/notify", "accept": "application/json" } }, "@context": [ "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/coreContext/ngsi-ld-core-context.json", "http://example.org/cim/vehicle.jsonld" ] } ]
schema/subscriptions/Subscription.json +111 −92 Original line number Diff line number Diff line Loading @@ -68,18 +68,10 @@ "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/geometry" } } } }, "SubscriptionFragment": { "type": "object", "properties": { "id": { "type": "string", "format": "uri" }, "type": { "type": "string", "const": "Subscription" }, "@context": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext" }, Loading @@ -98,9 +90,6 @@ "type": "string", "minLength": 1 }, "notification": { "$ref": "#/definitions/NotificationParams" }, "watchedAttributes": { "type": "array", "minItems": 1, Loading @@ -117,14 +106,6 @@ "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": [ "active", "paused", "expired" ] }, "isActive": { "type": "boolean" }, Loading @@ -141,12 +122,41 @@ "csf": { "type": "string" } } }, "Subscription": { "allOf": [ { "$ref": "#/definitions/SubscriptionFragment" }, { "type": "object", "properties": { "id": { "type": "string", "format": "uri" }, "type": { "type": "string", "const": "Subscription" }, "notification": { "$ref": "#/definitions/NotificationParams" }, "status": { "type": "string", "enum": [ "active", "paused", "expired" ] }, "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" } }, "allOf": [ { Loading @@ -171,3 +181,12 @@ } ] } ] } }, "allOf": [ { "$ref": "#/definitions/Subscription" } ] }
schema/subscriptions/SubscriptionList.json 0 → 100644 +17 −0 Original line number Diff line number Diff line { "$schema": "http://json-schema.org/schema#", "id": "https://uri.etsi.org/ngsi-ld/schema/SubscriptionList.json", "title": "NGSI-LD Subscription List", "description": "NGSI-LD Subscription List", "definitions": { "SubscriptionList": { "type": "array", "items": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Subscription.json#/definitions/Subscription" } } }, "allOf": [{ "$ref": "#/definitions/SubscriptionList" }] }