Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
NGSI Linked Data
NGSI-LD
Commits
47846e2c
Commit
47846e2c
authored
Nov 22, 2018
by
canterafonsj
Browse files
Fixing enumeration
parent
6602d101
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
272 additions
and
190 deletions
+272
-190
schema/common.json
schema/common.json
+2
-2
spec/updated/entities-spec.json
spec/updated/entities-spec.json
+123
-179
spec/updated/entity-operations-spec.json
spec/updated/entity-operations-spec.json
+147
-9
No files found.
schema/common.json
View file @
47846e2c
...
@@ -141,7 +141,7 @@
...
@@ -141,7 +141,7 @@
},
},
"geometry"
:
{
"geometry"
:
{
"type"
:
"string"
,
"type"
:
"string"
,
"enum
eration
"
:
[
"enum"
:
[
"Point"
,
"Point"
,
"MultiPoint"
,
"MultiPoint"
,
"LineString"
,
"LineString"
,
...
@@ -152,7 +152,7 @@
...
@@ -152,7 +152,7 @@
},
},
"timerel"
:
{
"timerel"
:
{
"type"
:
"string"
,
"type"
:
"string"
,
"enum
eration
"
:
[
"enum"
:
[
"before"
,
"before"
,
"after"
,
"after"
,
"between"
"between"
...
...
spec/updated/entities-spec.json
View file @
47846e2c
{
{
"openapi"
:
"3.0.1"
,
"openapi"
:
"3.0.1"
,
"info"
:
{
"info"
:
{
"title"
:
"NGSI-LD Entit
ie
s"
,
"title"
:
"NGSI-LD Entit
y Operation
s"
,
"version"
:
"
latest
"
"version"
:
"
0.1
"
},
},
"components"
:
{
"components"
:
{},
"parameters"
:
{
"paths"
:
{
"id"
:
{
"/entityOperations/create"
:
{
"name"
:
"id"
,
"post"
:
{
"description"
:
"Comma separated list of URIs to be retrieved"
,
"description"
:
"Batch Entity creation"
,
"in"
:
"query"
,
"operationId"
:
"batchEntityCreation"
,
"required"
:
false
,
"requestBody"
:
{
"schema"
:
{
"required"
:
true
,
"type"
:
"string"
,
"content"
:
{
"format"
:
"uri"
"application/json;application/ld+json"
:
{
}
"schema"
:
{
},
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList"
"type"
:
{
}
"name"
:
"type"
,
}
"description"
:
"Comma separated list of Entity type names to be retrieved"
,
}
"in"
:
"query"
,
},
"required"
:
false
,
"responses"
:
{
"schema"
:
{
"200"
:
{
"type"
:
"string"
,
"description"
:
"Success"
,
"minLength"
:
1
"content"
:
{
}
"application/json;application/ld+json"
:
{
},
"schema"
:
{
"idPattern"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
"name"
:
"idPattern"
,
}
"description"
:
"Regular expression that must be matched by Entity ids"
,
}
"in"
:
"query"
,
}
"required"
:
false
,
},
"schema"
:
{
"400"
:
{
"type"
:
"string"
,
"description"
:
"Bad request"
,
"format"
:
"regexp"
"content"
:
{
}
"application/json;application/ld+json"
:
{
},
"schema"
:
{
"attrs"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
"name"
:
"attrs"
,
}
"description"
:
"Comma separated list of attribute names (properties or relationships) to be retrieved"
,
}
"in"
:
"query"
,
}
"required"
:
false
,
}
"schema"
:
{
"type"
:
"string"
,
"minLength"
:
1
}
},
"q"
:
{
"name"
:
"q"
,
"description"
:
"Query"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"minLength"
:
1
}
},
"georel"
:
{
"name"
:
"georel"
,
"description"
:
"Geo-relationship"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/georel"
}
},
"geometry"
:
{
"name"
:
"geometry"
,
"description"
:
"Geometry"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/geometry"
}
},
"coordinates"
:
{
"name"
:
"coordinates"
,
"description"
:
"Coordinates serialized as a string"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/coordinates"
}
},
"geoproperty"
:
{
"name"
:
"geoproperty"
,
"description"
:
"The name of the property that contains the geo-spatial data that will be used to resolve the geoquery"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"minLength"
:
1
}
},
"csf"
:
{
"name"
:
"csf"
,
"description"
:
"Context Source Filter"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"minLength"
:
1
}
},
"limit"
:
{
"name"
:
"limit"
,
"description"
:
"Pagination limit"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"integer"
,
"minimum"
:
1
}
},
"options"
:{
"name"
:
"options"
,
"description"
:
"Options dictionary"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"enum"
:
[
"keyValues"
,
"sysAttrs"
]
}
}
}
}
}
},
},
"/entityOperations/update"
:
{
"paths"
:
{
"post"
:
{
"/entities/"
:
{
"description"
:
"Batch Entity update"
,
"get"
:
{
"operationId"
:
"batchEntityUpdate"
,
"description"
:
"Retrieve a set of entities which matches a specific query from an NGSI-LD system"
,
"operationId"
:
"queryEntities"
,
"parameters"
:
[
"parameters"
:
[
{
{
"$ref"
:
"#/components/parameters/id"
"name"
:
"options"
,
},
"in"
:
"query"
,
{
"required"
:
false
,
"$ref"
:
"#/components/parameters/idPattern"
"schema"
:
{
},
"type"
:
"string"
,
{
"enum"
:
[
"$ref"
:
"#/components/parameters/type"
"noOverwrite"
},
]
{
}
"$ref"
:
"#/components/parameters/attrs"
},
{
"$ref"
:
"#/components/parameters/q"
},
{
"$ref"
:
"#/components/parameters/georel"
},
{
"$ref"
:
"#/components/parameters/geometry"
},
{
"$ref"
:
"#/components/parameters/coordinates"
},
{
"$ref"
:
"#/components/parameters/geoproperty"
},
{
"$ref"
:
"#/components/parameters/csf"
},
{
"$ref"
:
"#/components/parameters/limit"
},
{
"$ref"
:
"#/components/parameters/options"
}
}
],
],
"requestBody"
:
{
"required"
:
true
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList"
}
}
}
},
"responses"
:
{
"responses"
:
{
"200"
:
{
"200"
:
{
"description"
:
"
OK
"
,
"description"
:
"
Success
"
,
"content"
:
{
"content"
:
{
"application/json;application/ld+json"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList"
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
},
"examples"
:
{
"simple"
:
{
"externalValue"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/EntityList-example.json"
}
}
}
}
}
}
}
...
@@ -195,23 +93,46 @@
...
@@ -195,23 +93,46 @@
}
}
}
}
}
}
},
}
},
"/entityOperations/upsert"
:
{
"post"
:
{
"post"
:
{
"description"
:
"Create a new Entity within an NGSI-LD system"
,
"description"
:
"Batch Entity upsert"
,
"operationId"
:
"createEntity"
,
"operationId"
:
"batchEntityUpsert"
,
"parameters"
:
[
{
"name"
:
"options"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"enum"
:
[
"replace"
,
"update"
]
}
}
],
"requestBody"
:
{
"requestBody"
:
{
"required"
:
true
,
"required"
:
true
,
"content"
:
{
"content"
:
{
"application/json;application/ld+json"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/Entity"
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity
List
.json#/definitions/Entity
List
"
}
}
}
}
}
}
},
},
"responses"
:
{
"responses"
:
{
"201"
:
{
"200"
:
{
"description"
:
"Created. Contains the resource URI of the created Entity"
"description"
:
"Success"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
}
}
}
},
},
"400"
:
{
"400"
:
{
"description"
:
"Bad request"
,
"description"
:
"Bad request"
,
...
@@ -222,19 +143,42 @@
...
@@ -222,19 +143,42 @@
}
}
}
}
}
}
},
}
"409"
:
{
}
"description"
:
"Already exists"
,
}
},
"/entityOperations/delete"
:
{
"post"
:
{
"description"
:
"Batch Entity delete"
,
"operationId"
:
"batchEntityDelete"
,
"requestBody"
:
{
"required"
:
true
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"type"
:
"array"
,
"items"
:
{
"type"
:
"string"
,
"format"
:
"uri"
},
"minItems"
:
1
}
}
}
},
"responses"
:
{
"200"
:
{
"description"
:
"Success"
,
"content"
:
{
"content"
:
{
"application/json;application/ld+json"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/
common.json#/definitions/ProblemDetails
"
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/
BatchOperationResult.json#/definitions/BatchOperationResult
"
}
}
}
}
}
}
},
},
"4
22
"
:
{
"4
00
"
:
{
"description"
:
"
Unprocessable Entity
"
,
"description"
:
"
Bad request
"
,
"content"
:
{
"content"
:
{
"application/json;application/ld+json"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"schema"
:
{
...
...
spec/updated/entity-operations-spec.json
View file @
47846e2c
...
@@ -2,14 +2,13 @@
...
@@ -2,14 +2,13 @@
"openapi"
:
"3.0.1"
,
"openapi"
:
"3.0.1"
,
"info"
:
{
"info"
:
{
"title"
:
"NGSI-LD Entity Operations"
,
"title"
:
"NGSI-LD Entity Operations"
,
"version"
:
"latest"
"version"
:
"0.1"
},
"components"
:
{
},
},
"components"
:
{},
"paths"
:
{
"paths"
:
{
"/entityOperations/create"
:
{
"/entityOperations/create"
:
{
"post"
:
{
"post"
:
{
"description"
:
"Batch Entity creation"
,
"description"
:
"Batch Entity creation"
,
"operationId"
:
"batchEntityCreation"
,
"operationId"
:
"batchEntityCreation"
,
"requestBody"
:
{
"requestBody"
:
{
"required"
:
true
,
"required"
:
true
,
...
@@ -25,12 +24,63 @@
...
@@ -25,12 +24,63 @@
"200"
:
{
"200"
:
{
"description"
:
"Success"
,
"description"
:
"Success"
,
"content"
:
{
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
}
}
}
},
"400"
:
{
"description"
:
"Bad request"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
}
}
}
}
}
},
"/entityOperations/update"
:
{
"post"
:
{
"description"
:
"Batch Entity update"
,
"operationId"
:
"batchEntityUpdate"
,
"parameters"
:
[
{
"name"
:
"options"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"enum"
:
[
"noOverwrite"
]
}
}
],
"requestBody"
:
{
"required"
:
true
,
"content"
:
{
"application/json;application/ld+json"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/
BatchOperationResul
t.json#/definitions/
BatchOperationResul
t"
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/
EntityLis
t.json#/definitions/
EntityLis
t"
}
}
}
}
}
}
},
"responses"
:
{
"200"
:
{
"description"
:
"Success"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
}
}
}
},
},
"400"
:
{
"400"
:
{
"description"
:
"Bad request"
,
"description"
:
"Bad request"
,
...
@@ -41,16 +91,104 @@
...
@@ -41,16 +91,104 @@
}
}
}
}
}
}
},
}
}
}
}
}
},
},
"/entityOperations/update"
:
{
},
"/entityOperations/upsert"
:
{
"/entityOperations/upsert"
:
{
"post"
:
{
"description"
:
"Batch Entity upsert"
,
"operationId"
:
"batchEntityUpsert"
,
"parameters"
:
[
{
"name"
:
"options"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"enum"
:
[
"replace"
,
"update"
]
}
}
],
"requestBody"
:
{
"required"
:
true
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList"
}
}
}
},
"responses"
:
{
"200"
:
{
"description"
:
"Success"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
}
}
}
},
"400"
:
{
"description"
:
"Bad request"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
}
}
}
}
}
},
},
"/entityOperations/delete"
:
{
"/entityOperations/delete"
:
{
"post"
:
{
"description"
:
"Batch Entity delete"
,
"operationId"
:
"batchEntityDelete"
,
"requestBody"
:
{
"required"
:
true
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"type"
:
"array"
,
"items"
:
{
"type"
:
"string"
,
"format"
:
"uri"
},
"minItems"
:
1
}
}
}
},
"responses"
:
{
"200"
:
{
"description"
:
"Success"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
}
}
}
},
"400"
:
{
"description"
:
"Bad request"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
}
}
}
}