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
Commits
63e61804
Commit
63e61804
authored
Nov 19, 2018
by
canterafonsj
Browse files
Refactoring schemas
parent
4a610861
Changes
3
Hide whitespace changes
Inline
Side-by-side
schema/common.json
View file @
63e61804
...
...
@@ -104,5 +104,51 @@
"required"
:
[
"type"
]
},
"georel"
:
{
"anyOf"
:
[
{
"type"
:
"string"
,
"enum"
:
[
"equals"
,
"disjoint"
,
"intersects"
,
"within"
,
"contains"
,
"overlaps"
]
},
{
"type"
:
"string"
,
"pattern"
:
"^near;((maxDistance==
\\
d+)|(minDistance==
\\
d+))$"
}
]
},
"coordinates"
:
{
"oneOf"
:
[
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/position"
},
{
"$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/geometry-schema.json#/definitions/lineString"
},
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/polygon"
}
]
},
"geometry"
:
{
"type"
:
"string"
,
"enumeration"
:
[
"Point"
,
"MultiPoint"
,
"LineString"
,
"MultiLineString"
,
"Polygon"
,
"MultiPolygon"
]
}
}
schema/subscriptions/Subscription.json
View file @
63e61804
...
...
@@ -59,50 +59,13 @@
],
"properties"
:
{
"georel"
:
{
"anyOf"
:
[
{
"type"
:
"string"
,
"enum"
:
[
"equals"
,
"disjoint"
,
"intersects"
,
"within"
,
"contains"
,
"overlaps"
]
},
{
"type"
:
"string"
,
"pattern"
:
"^near;((maxDistance==
\\
d+)|(minDistance==
\\
d+))$"
}
]
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/georel"
},
"coordinates"
:
{
"oneOf"
:
[
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/position"
},
{
"$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/geometry-schema.json#/definitions/lineString"
},
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/polygon"
}
]
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/coordinates"
},
"geometry"
:
{
"type"
:
"string"
,
"enumeration"
:
[
"Point"
,
"MultiPoint"
,
"LineString"
,
"MultiLineString"
,
"Polygon"
,
"MultiPolygon"
]
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/geometry"
}
}
}
...
...
spec/updated/entities-spec.json
View file @
63e61804
...
...
@@ -4,11 +4,144 @@
"title"
:
"NGSI-LD Entities"
,
"version"
:
"latest"
},
"components"
:
{
"parameters"
:
{
"id"
:
{
"name"
:
"id"
,
"description"
:
"Comma separated list of URIs to be retrieved"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"format"
:
"uri"
}
},
"type"
:
{
"name"
:
"type"
,
"description"
:
"Comma separated list of Entity type names to be retrieved"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"minLength"
:
1
}
},
"idPattern"
:
{
"name"
:
"idPattern"
,
"description"
:
"Regular expression that must be matched by Entity ids"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"minLength"
:
1
}
},
"attrs"
:
{
"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"
:
""
}
},
"geometry"
:
{
"name"
:
"geometry"
,
"description"
:
"Geometry"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"$ref"
:
""
}
},
"coordinates"
:
{
"name"
:
"coordinates"
,
"description"
:
"Coordinates serialized as a string"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"$ref"
:
""
}
},
"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
}
}
}
},
"paths"
:
{
"/entities/"
:
{
"get"
:
{
"description"
:
"Retrieve a set of entities which matches a specific query from an NGSI-LD system"
,
"operationId"
:
"queryEntities"
,
"parameters"
:
[
{
"$ref"
:
"#/components/parameters/id"
},
{
"$ref"
:
"#/components/parameters/idPattern"
},
{
"$ref"
:
"#/components/parameters/type"
},
{
"$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"
}
],
"responses"
:
{
"200"
:
{
"description"
:
"OK"
,
...
...
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