Commit 7af4b755 authored by Stefan Wiedemann's avatar Stefan Wiedemann
Browse files

update ci

parent 88a83753
Pipeline #5860 passed with stage
# This file is a template, and might need editing before it works on your project. # 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: # Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/ # https://hub.docker.com/r/library/node/tags/
image: node::13.7-alpine image: docker:19.03.12
# 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:
- test - test
...@@ -18,7 +12,10 @@ stages: ...@@ -18,7 +12,10 @@ stages:
test: test:
stage: test stage: test
script: script:
- echo "Running tests..." - scripts/setBasePath.sh https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master http://localhost:8090
- yarn test - docker run --name spec-server --rm -d -v ${PWD}/:/ngsi -e FOLDER=/ngsi -p 8090:8080 halverneus/static-file-server
- docker run --network host -it -v ${PWD}/:/data broothie/redoc-cli bundle spec/updated/ngsi-ld-spec-open-api.json -o spec/updated/full_api.json
- docker run --network host --rm -v ${PWD}/:/local openapitools/openapi-generator-cli validate -i /local/spec/updated/full_api.json
- scripts/setBasePath.sh http://localhost:8090 https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master
allow_failure: true allow_failure: true
{
"openapi": "3.0.3",
"info": {
"description": "This OAS file describes the NGSI-LD API defined by the ETSI ISG CIM group. This Cross-domain Context Information Management API allows to provide, consume and subscribe to context information in multiple scenarios and involving multiple stakeholders",
"version": "latest",
"title": "ETSI ISG CIM / NGSI-LD API",
"contact": {
"email": "NGSI-LD@etsi.org"
}
},
"externalDocs": {
"description": "Find out more about the ETSI ISG Context Information Management",
"url": "https://portal.etsi.org/tb.aspx?tbid=854&SubTB=854"
},
"tags": [
{
"name": "ETSI",
"description": "European Telecommunications Standards Institute",
"externalDocs": {
"description": "Find out more",
"url": "http://www.etsi.org"
}
},
{
"name": "CIM",
"description": "Context Information Management",
"externalDocs": {
"description": "Find out more",
"url": "https://portal.etsi.org/tb.aspx?tbid=854&SubTB=854"
}
},
{
"name": "JSON-LD",
"description": "JSON for Linked Data",
"externalDocs": {
"description": "Find out more",
"url": "https://json-ld.org/"
}
},
{
"name": "NGSI-LD API",
"description": "API defined by the ETSI ISG CIM",
"externalDocs": {
"description": "Preliminary Specification",
"url": "http://www.etsi.org/deliver/etsi_gs/CIM/001_099/004/01.01.01_60/gs_CIM004v010101p.pdf"
}
}
],
"paths": {
"/entities/": {
"get": {
"description": "Retrieve a set of entities which matches a specific query from an NGSI-LD system",
"operationId": "queryEntities",
"tags": [
"Context Information"
],
"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"
},
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/options"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/EntityList"
},
"examples": {
"simple": {
"externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/EntityList-example.json"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
},
"post": {
"description": "Create a new Entity within an NGSI-LD system",
"operationId": "createEntity",
"tags": [
"Context Information"
],
"requestBody": {
"required": true,
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/Entity"
}
}
}
},
"responses": {
"201": {
"description": "Created. Contains the resource URI of the created Entity"
},
"400": {
"description": "Bad request",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"409": {
"description": "Already exists",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"422": {
"description": "Unprocessable Entity",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
}
},
"/entities/{entityId}": {
"get": {
"description": "Retrieve an specific Entity from an NGSI-LD system. It's possible to specify the Entity attributes to be retrieved by using query parameters",
"operationId": "retrieveEntityById",
"tags": [
"Context Information"
],
"parameters": [
{
"$ref": "#/components/parameters/entityId"
},
{
"$ref": "#/components/parameters/attrs"
},
{
"$ref": "#/components/parameters/parameters-type"
},
{
"$ref": "#/components/parameters/options"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/Entity"
},
"examples": {
"simple": {
"externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/Entity-example.json"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
},
"delete": {
"description": "Removes an specific Entity from an NGSI-LD system",
"operationId": "removeEntityById",
"tags": [
"Context Information"
],
"parameters": [
{
"$ref": "#/components/parameters/entityId"
},
{
"$ref": "#/components/parameters/parameters-type"
}
],
"responses": {
"204": {
"description": "No Content. The entity was removed successfully"
},
"400": {
"description": "Bad Request",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
}
},
"/entities/{entityId}/attrs/": {
"post": {
"description": "Append new Entity attributes to an existing Entity within an NGSI-LD system",
"operationId": "appendEntityAttrs",
"tags": [
"Context Information"
],
"parameters": [
{
"$ref": "#/components/parameters/entityId"
},
{
"$ref": "#/components/parameters/parameters-options"
}
],
"requestBody": {
"required": true,
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/EntityFragment"
}
}
}
},
"responses": {
"204": {
"description": "No Content"
},
"207": {
"description": "Partial Success. Only the attributes included in the response payload were successfully appended",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/UpdateResult"
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
},
"patch": {
"description": "Update existing Entity attributes within an NGSI-LD system",
"operationId": "updateEntityAttrs",
"tags": [
"Context Information"
],
"parameters": [
{
"$ref": "#/components/parameters/entityId"
}
],
"requestBody": {
"required": true,
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/EntityFragment"
}
}
}
},
"responses": {
"204": {
"description": "No Content."
},
"207": {
"description": "Partial Success. Only the attributes included in the response payload were successfully updated",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/UpdateResult"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
}
},
"/entities/{entityId}/attrs/{attrId}": {
"patch": {
"description": "Update existing Entity attributes within an NGSI-LD system",
"operationId": "partialAttrUpdate",
"tags": [
"Context Information"
],
"parameters": [
{
"$ref": "#/components/parameters/entityId"
},
{
"$ref": "#/components/parameters/attrId"
}
],
"requestBody": {
"required": true,
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/EntityFragment"
}
}
}
},
"responses": {
"204": {
"description": "No Content."
},
"400": {
"description": "Bad Request",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
},
"delete": {
"description": "Removes an existing Entity attribute within an NGSI-LD system",
"operationId": "removeEntityAttr",
"tags": [
"Context Information"
],
"parameters": [
{
"$ref": "#/components/parameters/entityId"
},
{
"$ref": "#/components/parameters/attrId"
}
],
"responses": {
"204": {
"description": "No Content."
},
"400": {
"description": "Bad Request",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
}
},
"/subscriptions/": {
"get": {
"description": "Retrieves the subscriptions available in an NGSI-LD system",
"operationId": "retrieveSubscriptions",
"tags": [
"Context Subscription"
],
"parameters": [
{
"$ref": "#/components/parameters/limit"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/SubscriptionList"
},
"examples": {
"simple": {
"externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/SubscriptionList-example.json"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
},
"post": {
"description": "Creates a new Subscription within an NGSI-LD system",
"operationId": "createSubscription",
"tags": [
"Context Subscription"
],
"requestBody": {
"required": true,
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/Subscription"
}
}
}
},
"responses": {
"201": {
"description": "Created. Contains the resource URI of the created Subscription"
},
"400": {
"description": "Bad request",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"409": {
"description": "Already exists",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
}
},
"/subscriptions/{subscriptionId}": {
"get": {
"description": "Retrieves a specific Subscription from an NGSI-LD system",
"operationId": "retrieveSubscriptionById",
"tags": [
"Context Subscription"
],
"parameters": [
{
"$ref": "#/components/parameters/subscriptionId"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/components/schemas/Subscription"
},