Loading schema/subscriptions/Subscription.json +171 −148 Original line number Original line Diff line number Diff line { { "$schema": "http://json-schema.org/schema#", "$schema": "http://json-schema.org/schema#", "id": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/subscriptions/Subscription.json", "id": "https://uri.etsi.org/ngsi-ld/schema/Subscription.json", "title": "NGSI-LD Common Definitions", "title": "NGSI-LD Subscription", "description": "NGSI-LD Common", "description": "NGSI-LD Subscription", "definitions": { "definitions": { "Name": { "NotificationParams": { "type": "object", "properties": { "attributes": { "type": "array", "minItems": 1, "items": { "type": "string", "type": "string", "pattern": "^(\\d|[a-zA-Z]|_)+$", "minLength": 1 "minLength": 1, "description": "NGSI-LD Name" }, }, "observedAt": { "uniqueItems": true "type": "string", "format": "date-time" }, }, "createdAt": { "format": { "type": "string", "type": "string" "format": "date-time" }, }, "modifiedAt": { "endpoint": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Endpoint" }, "status": { "type": "string", "type": "string", "format": "date-time" "enum": [ "ok", "failed" ] }, }, "LdContext": { "timesSent": { "anyOf": [{ "type": "number", "type": "object" "minimum": 1 }, }, { "lastNotification": { "type": "string", "type": "string", "format": "uri" "format": "date-time" }, }, { "lastFailure": { "type": "array", "minItems": 1, "items": { "anyOf": [{ "type": "string", "type": "string", "format": "uri" "format": "date-time" }, }, { "lastSuccess": { "type": "object" "type": "string", } "format": "date-time" ] } } } }, "required": [ "endpoint" ] ] }, }, "Endpoint": { "GeoQuery": { "type": "object", "type": "object", "required": [ "required": [ "uri" "geometry", "coordinates", "georel" ], ], "properties": { "properties": { "uri": { "georel": { "type": "string", "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/georel" "format": "uri" }, }, "accept": { "coordinates": { "type": "string", "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/coordinates" "enum": [ }, "application/json", "geometry": { "application/ld+json" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/geometry" ] } } } } } }, }, "EntityInfo": { "type": "object", "type": "object", "properties": { "properties": { "id": { "id": { Loading @@ -73,78 +77,97 @@ "format": "uri" "format": "uri" }, }, "type": { "type": { "$ref": "#/definitions/Name" }, "idPattern": { "type": "string", "type": "string", "format": "regex" "const": "Subscription" } }, }, "required": [ "@context": { "type" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext" ] }, }, "ProblemDetails": { "entities": { "type": "object", "type": "array", "properties": { "items": { "type": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/EntityInfo" }, "minItems": 1 }, "name": { "type": "string", "type": "string", "format": "uri" "minLength": 1 }, }, "title": { "description": { "type": "string" "type": "string", "minLength": 1 }, }, "detail": { "notification": { "type": "string" "$ref": "#/definitions/NotificationParams" } }, }, "required": [ "watchedAttributes": { "type" "type": "array", ] "minItems": 1, "items": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name" }, }, "georel": { "uniqueItems": true "anyOf": [{ }, "timeInterval": { "type": "number", "minimum": 0 }, "expires": { "type": "string", "format": "date-time" }, "status": { "type": "string", "type": "string", "enum": [ "enum": [ "equals", "active", "disjoint", "paused", "intersects", "expired" "within", "contains", "overlaps" ] ] }, }, { "isActive": { "type": "string", "type": "boolean" "pattern": "^near;((maxDistance==\\d+)|(minDistance==\\d+))$" }, "throttling": { "type": "number", "minimum": 1 }, "q": { "type": "string" }, "geoQ": { "$ref": "#/definitions/GeoQuery" }, "csf": { "type": "string" } } ] }, }, "coordinates": { "createdAt": { "oneOf": [{ "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/createdAt" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/position" }, }, { "modifiedAt": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/positionArray" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/modifiedAt" }, }, "allOf": [ { { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/lineString" "required": [ "id", "type" ] }, }, { { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/polygon" "anyOf": [ } { "required": [ "entities" ] ] }, }, "geometry": { { "type": "string", "required": [ "enumeration": [ "watchedAttributes" "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon" ] ] } } ] } } ] } } Loading
schema/subscriptions/Subscription.json +171 −148 Original line number Original line Diff line number Diff line { { "$schema": "http://json-schema.org/schema#", "$schema": "http://json-schema.org/schema#", "id": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/subscriptions/Subscription.json", "id": "https://uri.etsi.org/ngsi-ld/schema/Subscription.json", "title": "NGSI-LD Common Definitions", "title": "NGSI-LD Subscription", "description": "NGSI-LD Common", "description": "NGSI-LD Subscription", "definitions": { "definitions": { "Name": { "NotificationParams": { "type": "object", "properties": { "attributes": { "type": "array", "minItems": 1, "items": { "type": "string", "type": "string", "pattern": "^(\\d|[a-zA-Z]|_)+$", "minLength": 1 "minLength": 1, "description": "NGSI-LD Name" }, }, "observedAt": { "uniqueItems": true "type": "string", "format": "date-time" }, }, "createdAt": { "format": { "type": "string", "type": "string" "format": "date-time" }, }, "modifiedAt": { "endpoint": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Endpoint" }, "status": { "type": "string", "type": "string", "format": "date-time" "enum": [ "ok", "failed" ] }, }, "LdContext": { "timesSent": { "anyOf": [{ "type": "number", "type": "object" "minimum": 1 }, }, { "lastNotification": { "type": "string", "type": "string", "format": "uri" "format": "date-time" }, }, { "lastFailure": { "type": "array", "minItems": 1, "items": { "anyOf": [{ "type": "string", "type": "string", "format": "uri" "format": "date-time" }, }, { "lastSuccess": { "type": "object" "type": "string", } "format": "date-time" ] } } } }, "required": [ "endpoint" ] ] }, }, "Endpoint": { "GeoQuery": { "type": "object", "type": "object", "required": [ "required": [ "uri" "geometry", "coordinates", "georel" ], ], "properties": { "properties": { "uri": { "georel": { "type": "string", "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/georel" "format": "uri" }, }, "accept": { "coordinates": { "type": "string", "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/coordinates" "enum": [ }, "application/json", "geometry": { "application/ld+json" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/geometry" ] } } } } } }, }, "EntityInfo": { "type": "object", "type": "object", "properties": { "properties": { "id": { "id": { Loading @@ -73,78 +77,97 @@ "format": "uri" "format": "uri" }, }, "type": { "type": { "$ref": "#/definitions/Name" }, "idPattern": { "type": "string", "type": "string", "format": "regex" "const": "Subscription" } }, }, "required": [ "@context": { "type" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext" ] }, }, "ProblemDetails": { "entities": { "type": "object", "type": "array", "properties": { "items": { "type": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/EntityInfo" }, "minItems": 1 }, "name": { "type": "string", "type": "string", "format": "uri" "minLength": 1 }, }, "title": { "description": { "type": "string" "type": "string", "minLength": 1 }, }, "detail": { "notification": { "type": "string" "$ref": "#/definitions/NotificationParams" } }, }, "required": [ "watchedAttributes": { "type" "type": "array", ] "minItems": 1, "items": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name" }, }, "georel": { "uniqueItems": true "anyOf": [{ }, "timeInterval": { "type": "number", "minimum": 0 }, "expires": { "type": "string", "format": "date-time" }, "status": { "type": "string", "type": "string", "enum": [ "enum": [ "equals", "active", "disjoint", "paused", "intersects", "expired" "within", "contains", "overlaps" ] ] }, }, { "isActive": { "type": "string", "type": "boolean" "pattern": "^near;((maxDistance==\\d+)|(minDistance==\\d+))$" }, "throttling": { "type": "number", "minimum": 1 }, "q": { "type": "string" }, "geoQ": { "$ref": "#/definitions/GeoQuery" }, "csf": { "type": "string" } } ] }, }, "coordinates": { "createdAt": { "oneOf": [{ "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/createdAt" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/position" }, }, { "modifiedAt": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/positionArray" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/modifiedAt" }, }, "allOf": [ { { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/lineString" "required": [ "id", "type" ] }, }, { { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/polygon" "anyOf": [ } { "required": [ "entities" ] ] }, }, "geometry": { { "type": "string", "required": [ "enumeration": [ "watchedAttributes" "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon" ] ] } } ] } } ] } }