@@ -14,6 +14,24 @@ More info @ [CONTIBUTE](./CONTRIBUTE.md)
Change requests are managed using [Gerrit](https://forge.etsi.org/gerrit).
### Local editing
>:warning: The described setup requires [docker](https://docs.docker.com/engine/install/) to be installed.
In order to edit the api locally, the script [runLocalDevEnv.sh](scripts/runLocalDevEnv.sh) can be used. When executed from the root of this repository,
it replaces all paths to the master branch inside [spec](spec) and [schema](schema) and serves them through a local file-server. Without that, all
references are resolved with 'https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master' and therefore changes will not be present locally.
With the local file-server still running, you can build the bundled api via:
"description":"One geometry as defined by GeoJSON. Licensed as per original source is https://github.com/fge/sample-json-schemas/blob/master/geojson/geometry.json",
"type":"object",
"required":[
"type",
"coordinates"
],
"oneOf":[
"allOf":[
{
"title":"Point",
"$ref":"#/definitions/Geometry"
}
],
"definitions":{
"position":{
"description":"A single position",
"type":"array",
"minItems":2,
"maxItems":2,
"items":{
"type":"number"
},
"additionalProperties":false
},
"positionArray":{
"description":"An array of positions",
"type":"array",
"items":{
"$ref":"#/definitions/position"
}
},
"lineString":{
"description":"An array of two or more positions",
"allOf":[
{
"$ref":"#/definitions/positionArray"
},
{
"minItems":2
}
]
},
"linearRing":{
"description":"An array of four positions where the first equals the last",
"allOf":[
{
"$ref":"#/definitions/positionArray"
},
{
"minItems":4
}
]
},
"polygon":{
"description":"An array of linear rings",
"type":"array",
"items":{
"$ref":"#/definitions/linearRing"
}
},
"Point":{
"type":"object",
"properties":{
"type":{
"type":"string",
...
...
@@ -23,8 +72,8 @@
}
}
},
{
"title":"MultiPoint",
"MultiPoint":{
"type":"object",
"properties":{
"type":{
"type":"string",
...
...
@@ -37,53 +86,53 @@
}
}
},
{
"title":"LineString",
"Polygon":{
"type":"object",
"properties":{
"type":{
"type":"string",
"enum":[
"LineString"
"Polygon"
]
},
"coordinates":{
"$ref":"#/definitions/lineString"
"$ref":"#/definitions/polygon"
}
}
},
{
"title":"MultiLineString",
"LineString":{
"type":"object",
"properties":{
"type":{
"type":"string",
"enum":[
"MultiLineString"
"LineString"
]
},
"coordinates":{
"type":"array",
"items":{
"$ref":"#/definitions/lineString"
}
"$ref":"#/definitions/lineString"
}
}
},
{
"title":"Polygon",
"MultiLineString":{
"type":"object",
"properties":{
"type":{
"type":"string",
"enum":[
"Polygon"
"MultiLineString"
]
},
"coordinates":{
"$ref":"#/definitions/polygon"
"type":"array",
"items":{
"$ref":"#/definitions/lineString"
}
}
}
},
{
"title":"MultiPolygon",
"MultiPolygon":{
"type":"object",
"properties":{
"type":{
"type":"string",
...
...
@@ -98,58 +147,29 @@
}
}
}
}
],
"definitions":{
"position":{
"description":"A single position",
"type":"array",
"minItems":2,
"items":[
},
"Geometry":{
"description":" Avalid GeoJSON geometry object",
"oneOf":[
{
"type":"number"
"$ref":"#/definitions/Point"
},
{
"type":"number"
}
],
"additionalItems":false
},
"positionArray":{
"description":"An array of positions",
"type":"array",
"items":{
"$ref":"#/definitions/position"
}
},
"lineString":{
"description":"An array of two or more positions",
"allOf":[
"$ref":"#/definitions/MultiPoint"
},
{
"$ref":"#/definitions/positionArray"
"$ref":"#/definitions/Polygon"
},
{
"minItems":2
}
]
},
"linearRing":{
"description":"An array of four positions where the first equals the last",