Commit 88f28fba authored by canterafonsj's avatar canterafonsj
Browse files

Restoring Subscriptions

parent 31ba1cf5
{ {
"$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": "string", "type": "object",
"pattern": "^(\\d|[a-zA-Z]|_)+$", "properties": {
"minLength": 1, "attributes": {
"description": "NGSI-LD Name" "type": "array",
}, "minItems": 1,
"observedAt": { "items": {
"type": "string", "type": "string",
"format": "date-time" "minLength": 1
}, },
"createdAt": { "uniqueItems": true
"type": "string", },
"format": "date-time" "format": {
}, "type": "string"
"modifiedAt": { },
"type": "string", "endpoint": {
"format": "date-time" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Endpoint"
}, },
"LdContext": { "status": {
"anyOf": [{ "type": "string",
"type": "object" "enum": [
}, "ok",
{ "failed"
"type": "string", ]
"format": "uri" },
}, "timesSent": {
{ "type": "number",
"type": "array", "minimum": 1
"minItems": 1, },
"items": { "lastNotification": {
"anyOf": [{ "type": "string",
"type": "string", "format": "date-time"
"format": "uri" },
}, "lastFailure": {
{ "type": "string",
"type": "object" "format": "date-time"
} },
] "lastSuccess": {
} "type": "string",
} "format": "date-time"
] }
}, },
"Endpoint": { "required": [
"type": "object", "endpoint"
"required": [ ]
"uri" },
], "GeoQuery": {
"properties": { "type": "object",
"uri": { "required": [
"type": "string", "geometry",
"format": "uri" "coordinates",
}, "georel"
"accept": { ],
"type": "string", "properties": {
"enum": [ "georel": {
"application/json", "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/georel"
"application/ld+json" },
] "coordinates": {
} "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/coordinates"
} },
}, "geometry": {
"EntityInfo": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/geometry"
"type": "object", }
"properties": { }
"id": { }
"type": "string", },
"format": "uri" "type": "object",
}, "properties": {
"type": { "id": {
"$ref": "#/definitions/Name" "type": "string",
}, "format": "uri"
"idPattern": { },
"type": "string", "type": {
"format": "regex" "type": "string",
} "const": "Subscription"
}, },
"required": [ "@context": {
"type" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext"
] },
}, "entities": {
"ProblemDetails": { "type": "array",
"type": "object", "items": {
"properties": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/EntityInfo"
"type": { },
"type": "string", "minItems": 1
"format": "uri" },
}, "name": {
"title": { "type": "string",
"type": "string" "minLength": 1
}, },
"detail": { "description": {
"type": "string" "type": "string",
} "minLength": 1
}, },
"required": [ "notification": {
"type" "$ref": "#/definitions/NotificationParams"
] },
}, "watchedAttributes": {
"georel": { "type": "array",
"anyOf": [{ "minItems": 1,
"type": "string", "items": {
"enum": [ "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
"equals", },
"disjoint", "uniqueItems": true
"intersects", },
"within", "timeInterval": {
"contains", "type": "number",
"overlaps" "minimum": 0
] },
}, "expires": {
{ "type": "string",
"type": "string", "format": "date-time"
"pattern": "^near;((maxDistance==\\d+)|(minDistance==\\d+))$" },
} "status": {
] "type": "string",
}, "enum": [
"coordinates": { "active",
"oneOf": [{ "paused",
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/position" "expired"
}, ]
{ },
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/positionArray" "isActive": {
}, "type": "boolean"
{ },
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/lineString" "throttling": {
}, "type": "number",
{ "minimum": 1
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/polygon" },
} "q": {
] "type": "string"
}, },
"geometry": { "geoQ": {
"type": "string", "$ref": "#/definitions/GeoQuery"
"enumeration": [ },
"Point", "csf": {
"MultiPoint", "type": "string"
"LineString", }
"MultiLineString", },
"Polygon", "createdAt": {
"MultiPolygon" "$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": [
{
"required": [
"id",
"type"
]
},
{
"anyOf": [
{
"required": [
"entities"
]
},
{
"required": [
"watchedAttributes"
]
}
]
}
]
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment