Commits (44)
# This file is a template, and might need editing before it works on your project.
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node::13.7-alpine
# This folder is cached between builds
# http://docs.rep.com/ce/ci/yaml/README.html#cache
cache:
paths:
- node_modules/
before_script: before_script:
- yarn - docker info
stages: stages:
- prepare
- test - test
build:
stage: prepare
image: docker:19.03.12
script:
- scripts/setBasePath.sh https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master http://localhost:8080
- docker build -t ngsi-local -f docker/Dockerfile .
allow_failure: false
test: test:
stage: test stage: test
image: docker:19.03.12
services:
- ngsi-local
script: script:
- echo "Running tests..." - echo ${TEST}
- yarn test - scripts/setBasePath.sh https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master http://localhost:9090
allow_failure: true - docker run --network host -i -v ${PWD}/:/data wistefan/redocly-openapi-cli bundle /data/spec/updated/ngsi-ld-spec-open-api.json -o /data/spec/updated/generated/full_api.json
- docker run --network host --rm -v ${PWD}/:/local openapitools/openapi-generator-cli validate -i /local/spec/updated/generated/full_api.json
allow_failure: false
# TODO: after gitlab update, the ci should publish the bundled api
...@@ -10,10 +10,29 @@ This repository contains OpenAPI descriptions for the NGSI-LD interface defined ...@@ -10,10 +10,29 @@ This repository contains OpenAPI descriptions for the NGSI-LD interface defined
To get an account on ETSI Forge and to learn how to contribute visit the [Forge Getting started wiki](https://forge.etsi.org/wiki/index.php/Get_started). To get an account on ETSI Forge and to learn how to contribute visit the [Forge Getting started wiki](https://forge.etsi.org/wiki/index.php/Get_started).
More info @ [CONTIBUTE](./CONTRIBUTE.md) More info @ [CONTRIBUTE](./CONTRIBUTE.md)
Change requests are managed using [Gerrit](https://forge.etsi.org/gerrit). 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:
```
docker run --network host -it -v ${PWD}/:/data wistefan/redocly-openapi-cli bundle /data/spec/updated/ngsi-ld-spec-open-api.json -o /data/spec/updated/generated/full_api.json
```
And validate it with:
```
docker run --network host --rm -v ${PWD}/:/local openapitools/openapi-generator-cli validate -i /local/spec/updated/generated/full_api.json
```
When editing is finished, hit the enter button on your local dev env and push.
## Report issues ## Report issues
To report issues, bugs or requests please fill in a bug [at this location](https://forge.etsi.org/bugzilla/enter_bug.cgi?product=NGSI-LD). To report issues, bugs or requests please fill in a bug [at this location](https://forge.etsi.org/bugzilla/enter_bug.cgi?product=NGSI-LD).
......
This diff is collapsed.
This diff is collapsed.
FROM halverneus/static-file-server
ADD . /web
\ No newline at end of file
{
"name": "ngsi-ld",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"ajv": {
"version": "6.5.5",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz",
"integrity": "sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==",
"requires": {
"fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
}
},
"fast-deep-equal": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
},
"fast-json-stable-stringify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
},
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"uri-js": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
"integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
"requires": {
"punycode": "^2.1.0"
}
}
}
}
{
"name": "ngsi-ld",
"version": "1.0.1",
"description": "NGSI-LD Schema Compilation",
"main": "index.js",
"scripts": {
"test": "./scripts/validate_all.sh",
"validate-examples": "./scripts/validate_examples.sh",
"validate-locally": "./scripts/validate_locally.sh",
"validate-online": "./scripts/validate_online.sh",
"validate-schema": "./scripts/validate_schema.sh",
"combine-files": "./scripts/combine_files.sh"
},
"repository": {
"type": "git",
"url": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD"
},
"keywords": [
"NGSI-LD"
],
"author": "Jose Manuel Cantera",
"license": "ISC",
"dependencies": {
"ajv": "^6.12.5",
"swagger-cli": "^4.0.4"
}
}
{ {
"$schema": "http://json-schema.org/schema#",
"$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json",
"title": "NGSI-LD Batch Operation Result", "title": "NGSI-LD Batch Operation Result",
"description": "NGSI-LD Batch Operation Result", "description": "NGSI-LD Batch Operation Result",
"definitions": { "definitions": {
"BatchEntityError": { "BatchEntityError": {
"entityId": { "type": "object",
"type": "string", "properties": {
"format": "uri" "entityId": {
}, "type": "string",
"error": { "format": "uri"
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails" },
"error": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
} }
}, },
"BatchOperationResult": { "BatchOperationResult": {
...@@ -37,4 +38,4 @@ ...@@ -37,4 +38,4 @@
"$ref": "#/definitions/BatchOperationResult" "$ref": "#/definitions/BatchOperationResult"
} }
] ]
} }
\ No newline at end of file
{ {
"$schema": "http://json-schema.org/schema#",
"$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json",
"title": "NGSI-LD Entity", "title": "NGSI-LD Entity",
"description": "NGSI-LD Entity", "description": "NGSI-LD Entity",
"definitions": { "definitions": {
...@@ -17,10 +15,10 @@ ...@@ -17,10 +15,10 @@
"properties": { "properties": {
"type": { "type": {
"type": "string", "type": "string",
"const": "Property" "enum": ["Property"]
}, },
"value": { "value": {
"type": [ "oneOf": [
"string", "string",
"number", "number",
"boolean", "boolean",
...@@ -49,7 +47,7 @@ ...@@ -49,7 +47,7 @@
"value" "value"
], ],
"additionalProperties": { "additionalProperties": {
"anyOf": [ "oneOf": [
{ {
"$ref": "#/definitions/Property" "$ref": "#/definitions/Property"
}, },
...@@ -64,7 +62,7 @@ ...@@ -64,7 +62,7 @@
"properties": { "properties": {
"type": { "type": {
"type": "string", "type": "string",
"const": "Relationship" "enum": ["Relationship"]
}, },
"object": { "object": {
"type": "string", "type": "string",
...@@ -91,7 +89,7 @@ ...@@ -91,7 +89,7 @@
"object" "object"
], ],
"additionalProperties": { "additionalProperties": {
"anyOf": [ "oneOf": [
{ {
"$ref": "#/definitions/Property" "$ref": "#/definitions/Property"
}, },
...@@ -106,10 +104,10 @@ ...@@ -106,10 +104,10 @@
"properties": { "properties": {
"type": { "type": {
"type": "string", "type": "string",
"const": "GeoProperty" "enum": ["GeoProperty"]
}, },
"value": { "value": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#" "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/Geometry"
}, },
"observedAt": { "observedAt": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/observedAt" "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/observedAt"
...@@ -132,7 +130,7 @@ ...@@ -132,7 +130,7 @@
"value" "value"
], ],
"additionalProperties": { "additionalProperties": {
"anyOf": [ "oneOf": [
{ {
"$ref": "#/definitions/Property" "$ref": "#/definitions/Property"
}, },
...@@ -172,7 +170,7 @@ ...@@ -172,7 +170,7 @@
} }
}, },
"additionalProperties": { "additionalProperties": {
"anyOf": [ "oneOf": [
{ {
"$ref": "#/definitions/Property" "$ref": "#/definitions/Property"
}, },
...@@ -183,9 +181,6 @@ ...@@ -183,9 +181,6 @@
"$ref": "#/definitions/GeoProperty" "$ref": "#/definitions/GeoProperty"
} }
] ]
},
"propertyNames": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/PropertyNames"
} }
}, },
"Entity": { "Entity": {
......
{ {
"$schema": "http://json-schema.org/schema#",
"$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json",
"title": "NGSI-LD EntityList", "title": "NGSI-LD EntityList",
"description": "NGSI-LD EntityList", "description": "NGSI-LD EntityList",
"definitions": { "definitions": {
...@@ -11,7 +9,9 @@ ...@@ -11,7 +9,9 @@
} }
} }
}, },
"allOf": [{ "allOf": [
"$ref": "#/definitions/EntityList" {
}] "$ref": "#/definitions/EntityList"
} }
]
}
\ No newline at end of file
{
"$schema": "http://json-schema.org/schema#",
"$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Entity_keyValues.json",
"title": "NGSI-LD Entity Key Values",
"description": "NGSI-LD Entity Simplified Representation",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uri"
},
"type": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
},
"@context": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext"
},
"location": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#"
},
"observationSpace": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#"
},
"operationSpace": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#"
},
"createdAt": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/createdAt"
},
"modifiedAt": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/modifiedAt"
}
},
"required": [
"type",
"id"
],
"additionalProperties": {
"type": [
"string",
"number",
"boolean",
"array",
"object"
]
},
"propertyNames": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/PropertyNames"
}
}
{
"title": "Geometry",
"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"
],
"allOf": [
{
"$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",
"enum": [
"Point"
]
},
"coordinates": {
"$ref": "#/definitions/position"
}
}
},
"MultiPoint": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPoint"
]
},
"coordinates": {
"$ref": "#/definitions/positionArray"
}
}
},
"Polygon": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Polygon"
]
},
"coordinates": {
"$ref": "#/definitions/polygon"
}
}
},
"LineString": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"LineString"
]
},
"coordinates": {
"$ref": "#/definitions/lineString"
}
}
},
"MultiLineString": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"MultiLineString"
]
},
"coordinates": {
"type": "array",
"items": {
"$ref": "#/definitions/lineString"
}
}
}
},
"MultiPolygon": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPolygon"
]
},
"coordinates": {
"type": "array",
"items": {
"$ref": "#/definitions/polygon"
}
}
}
},
"Geometry": {
"description": " Avalid GeoJSON geometry object",
"oneOf": [
{
"$ref": "#/definitions/Point"
},
{
"$ref": "#/definitions/MultiPoint"
},
{
"$ref": "#/definitions/Polygon"
},
{
"$ref": "#/definitions/LineString"
},
{
"$ref": "#/definitions/MultiLineString"
},
{
"$ref": "#/definitions/MultiPolygon"
}
]
}
}
}
\ No newline at end of file
{ {
"$schema": "http://json-schema.org/schema#",
"$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/UpdateResult.json",
"title": "NGSI-LD Update Result", "title": "NGSI-LD Update Result",
"description": "NGSI-LD Update Result", "description": "NGSI-LD Update Result",
"definitions": { "definitions": {
"NotUpdatedDetails": { "NotUpdatedDetails": {
"attributeName": { "type": "object",
"type": "string", "properties": {
"pattern": "" "attributeName": {
}, "type": "string",
"reason": { "pattern": ""
"type": "string", },
"minLenght": 1 "reason": {
"type": "string",
"minLength": 1
}
} }
}, },
"UpdateResult": { "UpdateResult": {
...@@ -38,4 +39,4 @@ ...@@ -38,4 +39,4 @@
"$ref": "#/definitions/UpdateResult" "$ref": "#/definitions/UpdateResult"
} }
] ]
} }
\ No newline at end of file
{ {
"$schema": "http://json-schema.org/schema#",
"$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json",
"title": "NGSI-LD Common Definitions", "title": "NGSI-LD Common Definitions",
"description": "NGSI-LD Common", "description": "NGSI-LD Common",
"definitions": { "definitions": {
...@@ -27,7 +25,7 @@ ...@@ -27,7 +25,7 @@
"format": "date-time" "format": "date-time"
}, },
"LdContext": { "LdContext": {
"anyOf": [ "oneOf": [
{ {
"type": "object" "type": "object"
}, },
...@@ -39,7 +37,7 @@ ...@@ -39,7 +37,7 @@
"type": "array", "type": "array",
"minItems": 1, "minItems": 1,
"items": { "items": {
"anyOf": [ "oneOf": [
{ {
"type": "string", "type": "string",
"format": "uri" "format": "uri"
...@@ -109,7 +107,7 @@ ...@@ -109,7 +107,7 @@
] ]
}, },
"georel": { "georel": {
"anyOf": [ "oneOf": [
{ {
"type": "string", "type": "string",
"enum": [ "enum": [
...@@ -130,16 +128,16 @@ ...@@ -130,16 +128,16 @@
"coordinates": { "coordinates": {
"oneOf": [ "oneOf": [
{ {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/position" "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/position"
}, },
{ {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/positionArray" "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/positionArray"
}, },
{ {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/lineString" "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/lineString"
}, },
{ {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/polygon" "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/polygon"
} }
] ]
}, },
...@@ -163,4 +161,4 @@ ...@@ -163,4 +161,4 @@
] ]
} }
} }
} }
\ No newline at end of file
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json",
"title": "geometry",
"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": [
{
"title": "Point",
"properties": {
"type": { "enum": [ "Point" ] },
"coordinates": { "$ref": "#/definitions/position" }
}
},
{
"title": "MultiPoint",
"properties": {
"type": { "enum": [ "MultiPoint" ] },
"coordinates": { "$ref": "#/definitions/positionArray" }
}
},
{
"title": "LineString",
"properties": {
"type": { "enum": [ "LineString" ] },
"coordinates": { "$ref": "#/definitions/lineString" }
}
},
{
"title": "MultiLineString",
"properties": {
"type": { "enum": [ "MultiLineString" ] },
"coordinates": {
"type": "array",
"items": { "$ref": "#/definitions/lineString" }
}
}
},
{
"title": "Polygon",
"properties": {
"type": { "enum": [ "Polygon" ] },
"coordinates": { "$ref": "#/definitions/polygon" }
}
},
{
"title": "MultiPolygon",
"properties": {
"type": { "enum": [ "MultiPolygon" ] },
"coordinates": {
"type": "array",
"items": { "$ref": "#/definitions/polygon" }
}
}
}
],
"definitions": {
"position": {
"description": "A single position",
"type": "array",
"minItems": 2,
"items": [ { "type": "number" }, { "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/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" }
}
}
}
...@@ -6,11 +6,6 @@ ...@@ -6,11 +6,6 @@
"definitions": { "definitions": {
"RegistrationInfo": { "RegistrationInfo": {
"type": "object", "type": "object",
"anyOf": [
{"required": ["entities"]},
{"required": ["properties"]},
{"required": ["relationships"]}
],
"properties": { "properties": {
"entities": { "entities": {
"type": "array", "type": "array",
...@@ -73,13 +68,13 @@ ...@@ -73,13 +68,13 @@
"$ref": "#/definitions/TimeInterval" "$ref": "#/definitions/TimeInterval"
}, },
"location": { "location": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#" "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/Geometry"
}, },
"observationSpace": { "observationSpace": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#" "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/Geometry"
}, },
"operationSpace": { "operationSpace": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#" "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/Geometry"
}, },
"expires": { "expires": {
"type": "string", "type": "string",
...@@ -98,15 +93,7 @@ ...@@ -98,15 +93,7 @@
"format": "uri" "format": "uri"
} }
}, },
"additionalProperties": { "additionalProperties": true
"type": [
"string",
"number",
"boolean",
"array",
"object"
]
}
}, },
"ContextSourceRegistration": { "ContextSourceRegistration": {
"allOf": [ "allOf": [
...@@ -122,7 +109,7 @@ ...@@ -122,7 +109,7 @@
}, },
"type": { "type": {
"type": "string", "type": "string",
"const": "ContextSourceRegistration" "enum": ["ContextSourceRegistration"]
}, },
"createdAt": { "createdAt": {
"$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/createdAt" "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/createdAt"
......
{ {
"$schema": "http://json-schema.org/schema#",
"$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/subscriptions/Notification.json",
"title": "NGSI-LD Notification", "title": "NGSI-LD Notification",
"description": "NGSI-LD Notification", "description": "NGSI-LD Notification",
"type": "object", "type": "object",
...@@ -11,7 +9,9 @@ ...@@ -11,7 +9,9 @@
}, },
"type": { "type": {
"type": "string", "type": "string",
"const": "Notification" "enum": [
"Notification"
]
}, },
"subscriptionId": { "subscriptionId": {
"type": "string", "type": "string",
...@@ -38,4 +38,4 @@ ...@@ -38,4 +38,4 @@
"notifiedAt", "notifiedAt",
"data" "data"
] ]
} }
\ No newline at end of file
{ {
"$schema": "http://json-schema.org/schema#",
"$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/subscriptions/Subscription.json",
"title": "NGSI-LD Subscription", "title": "NGSI-LD Subscription",
"description": "NGSI-LD Subscription", "description": "NGSI-LD Subscription",
"definitions": { "definitions": {
...@@ -138,7 +136,7 @@ ...@@ -138,7 +136,7 @@
}, },
"type": { "type": {
"type": "string", "type": "string",
"const": "Subscription" "enum": ["Subscription"]
}, },
"notification": { "notification": {
"$ref": "#/definitions/NotificationParams" "$ref": "#/definitions/NotificationParams"
...@@ -190,4 +188,4 @@ ...@@ -190,4 +188,4 @@
"$ref": "#/definitions/Subscription" "$ref": "#/definitions/Subscription"
} }
] ]
} }
\ No newline at end of file
{ {
"$schema": "http://json-schema.org/schema#",
"$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/subscriptions/SubscriptionList.json",
"title": "NGSI-LD Subscription List", "title": "NGSI-LD Subscription List",
"description": "NGSI-LD Subscription List", "description": "NGSI-LD Subscription List",
"definitions": { "definitions": {
...@@ -11,7 +9,9 @@ ...@@ -11,7 +9,9 @@
} }
} }
}, },
"allOf": [{ "allOf": [
"$ref": "#/definitions/SubscriptionList" {
}] "$ref": "#/definitions/SubscriptionList"
} }
]
}
\ No newline at end of file