Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
NGSI Linked Data
NGSI-LD API
Commits
599a9ba3
Commit
599a9ba3
authored
Nov 19, 2018
by
canterafonsj
Browse files
Fix common schema
parent
63e61804
Changes
1
Show whitespace changes
Inline
Side-by-side
schema/subscriptions/Subscription.json
View file @
599a9ba3
{
"$schema"
:
"http://json-schema.org/schema#"
,
"id"
:
"https://
uri
.etsi.org/
ngsi-ld/schema/Subscripti
on.json"
,
"title"
:
"NGSI-LD
Subscrip
tion"
,
"description"
:
"NGSI-LD
Subscripti
on"
,
"id"
:
"https://
forge
.etsi.org/
gitlab/NGSI-LD/NGSI-LD/raw/master/schema/comm
on.json"
,
"title"
:
"NGSI-LD
Common Defini
tion
s
"
,
"description"
:
"NGSI-LD
Comm
on"
,
"definitions"
:
{
"NotificationParams"
:
{
"type"
:
"object"
,
"properties"
:
{
"attributes"
:
{
"type"
:
"array"
,
"minItems"
:
1
,
"items"
:
{
"Name"
:
{
"type"
:
"string"
,
"minLength"
:
1
}
,
"uniqueItems"
:
true
"pattern"
:
"^(
\\
d|[a-zA-Z]|_)+$"
,
"minLength"
:
1
,
"description"
:
"NGSI-LD Name"
},
"format"
:
{
"type"
:
"string"
},
"endpoint"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Endpoint"
},
"status"
:
{
"observedAt"
:
{
"type"
:
"string"
,
"enum"
:
[
"ok"
,
"failed"
]
},
"timesSent"
:
{
"type"
:
"number"
,
"minimum"
:
1
"format"
:
"date-time"
},
"lastNotification
"
:
{
"createdAt
"
:
{
"type"
:
"string"
,
"format"
:
"date-time"
},
"lastFailure
"
:
{
"modifiedAt
"
:
{
"type"
:
"string"
,
"format"
:
"date-time"
},
"lastSuccess"
:
{
"LdContext"
:
{
"anyOf"
:
[{
"type"
:
"object"
},
{
"type"
:
"string"
,
"format"
:
"date-time"
}
"format"
:
"uri"
},
"required"
:
[
"endpoint"
{
"type"
:
"array"
,
"minItems"
:
1
,
"items"
:
{
"anyOf"
:
[{
"type"
:
"string"
,
"format"
:
"uri"
},
{
"type"
:
"object"
}
]
}
}
]
},
"GeoQuery
"
:
{
"Endpoint
"
:
{
"type"
:
"object"
,
"required"
:
[
"geometry"
,
"coordinates"
,
"georel"
"uri"
],
"properties"
:
{
"georel"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/georel"
},
"coordinates"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/coordinates"
"uri"
:
{
"type"
:
"string"
,
"format"
:
"uri"
},
"geometry"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/geometry"
}
"accept"
:
{
"type"
:
"string"
,
"enum"
:
[
"application/json"
,
"application/ld+json"
]
}
}
},
"EntityInfo"
:
{
"type"
:
"object"
,
"properties"
:
{
"id"
:
{
...
...
@@ -77,97 +73,78 @@
"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"
},
"entities"
:
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/EntityInfo"
},
"minItems"
:
1
"$ref"
:
"#/definitions/Name"
},
"name
"
:
{
"idPattern
"
:
{
"type"
:
"string"
,
"minLength"
:
1
},
"description"
:
{
"type"
:
"string"
,
"minLength"
:
1
"format"
:
"regex"
}
},
"notification"
:
{
"$ref"
:
"#/definitions/NotificationParams"
"required"
:
[
"type"
]
},
"watchedAttributes"
:
{
"type"
:
"array"
,
"minItems"
:
1
,
"items"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
"ProblemDetails"
:
{
"type"
:
"object"
,
"properties"
:
{
"type"
:
{
"type"
:
"string"
,
"format"
:
"uri"
},
"uniqueItems"
:
true
"title"
:
{
"type"
:
"string"
},
"timeInterva
l"
:
{
"type"
:
"
number"
,
"minimum"
:
0
"detai
l"
:
{
"type"
:
"
string"
}
},
"exp
ire
s
"
:
{
"type"
:
"string"
,
"format"
:
"date-time"
"requ
ire
d
"
:
[
"type"
]
},
"status"
:
{
"georel"
:
{
"anyOf"
:
[{
"type"
:
"string"
,
"enum"
:
[
"active"
,
"paused"
,
"expired"
"equals"
,
"disjoint"
,
"intersects"
,
"within"
,
"contains"
,
"overlaps"
]
},
"isActive"
:
{
"type"
:
"boolean"
},
"throttling"
:
{
"type"
:
"number"
,
"minimum"
:
1
},
"q"
:
{
"type"
:
"string"
},
"geoQ"
:
{
"$ref"
:
"#/definitions/GeoQuery"
},
"csf"
:
{
"type"
:
"string"
{
"type"
:
"string"
,
"pattern"
:
"^near;((maxDistance==
\\
d+)|(minDistance==
\\
d+))$"
}
]
},
"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"
"coordinates"
:
{
"oneOf"
:
[{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/position"
},
"allOf"
:
[
{
"required"
:
[
"id"
,
"type"
]
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/positionArray"
},
{
"anyOf"
:
[
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/lineString"
},
{
"required"
:
[
"entities"
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/polygon"
}
]
},
{
"required"
:
[
"watchedAttributes"
"geometry"
:
{
"type"
:
"string"
,
"enumeration"
:
[
"Point"
,
"MultiPoint"
,
"LineString"
,
"MultiLineString"
,
"Polygon"
,
"MultiPolygon"
]
}
]
}
]
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment