diff --git a/scripts/validate_schema.sh b/scripts/validate_schema.sh index 1dd345ee27012cc32617b164f028b67f90d21c5a..6cf323d4c25e030c9604674932d3a73c23131ce8 100755 --- a/scripts/validate_schema.sh +++ b/scripts/validate_schema.sh @@ -14,6 +14,8 @@ ajv compile -s $SCHEMAS/registrations/ContextSourceNotification.json -r $SCHEMAS ajv compile -s $SCHEMAS/EntityList.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/Entity.json +ajv compile -s $SCHEMAS/subscriptions/SubscriptionList.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/subscriptions/Subscription.json + ajv compile -s $SCHEMAS/temporal/EntityTemporalList.json -r $SCHEMAS/temporal/EntityTemporal.json -r $SCHEMAS/Entity.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json ajv compile -s $SCHEMAS/BatchOperationResult.json -r $SCHEMAS/common.json diff --git a/spec/updated/subscription-by-id-spec.json b/spec/updated/subscription-by-id-spec.json new file mode 100644 index 0000000000000000000000000000000000000000..8923baf1f873886a00d32994ea916237da006ef5 --- /dev/null +++ b/spec/updated/subscription-by-id-spec.json @@ -0,0 +1,105 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "NGSI-LD Subscription By Id", + "version": "latest" + }, + "components": { + "parameters": { + "subscriptionId": { + "name": "subscriptionId", + "description": "Subscription Id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uri" + } + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}": { + "get": { + "description": "Retrieves a specific Subscription from an NGSI-LD system", + "operationId": "retrieveSubscription", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionId" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/subscriptions/Subscription.json#/definitions/Subscription" + }, + "examples": { + "simple": { + "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/Subscription-example_C.4.json" + } + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails" + } + } + } + } + } + }, + "delete": { + "description": "Removes a specific Subscription from an NGSI-LD system", + "operationId": "removeSubscription", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionId" + } + ], + "responses": { + "204": { + "description": "No Content. The Subscription was removed successfully" + }, + "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" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails" + } + } + } + } + } + } + } + } +} \ No newline at end of file