Commit a6fef75b authored by canterafonsj's avatar canterafonsj
Browse files

Fixing last links

parent f4b91e56
......@@ -31,7 +31,7 @@
},
{
"name": "JSON-LD",
"description": "JSON for Linking Data",
"description": "JSON for Linked Data",
"externalDocs": {
"description": "Find out more",
"url": "https://json-ld.org/"
......@@ -41,7 +41,7 @@
"name": "NGSI-LD API",
"description": "API defined by the ETSI ISG CIM",
"externalDocs": {
"description": "Find out more",
"description": "Preliminary Specification",
"url": "http://www.etsi.org/deliver/etsi_gs/CIM/001_099/004/01.01.01_60/gs_CIM004v010101p.pdf"
}
}
......@@ -134,7 +134,7 @@
"required": false,
"schema": {
"type": "string",
"enumeration": [
"enum": [
"Point",
"MultiPoint",
"LineString",
......@@ -152,16 +152,16 @@
"schema": {
"oneOf": [
{
"$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/value/definitions/position"
"$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/position"
},
{
"$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/value/definitions/positionArray"
"$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/positionArray"
},
{
"$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/value/definitions/lineString"
"$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/lineString"
},
{
"$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/value/definitions/polygon"
"$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/polygon"
}
]
}
......@@ -216,10 +216,7 @@
"content": {
"application/json;application/ld+json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
}
"$ref": "#/paths/~1entityOperations~1create/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
},
"examples": {
"simple": {
......@@ -273,7 +270,7 @@
"format": "uri"
},
"type": {
"$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/2/schema"
"$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
},
"createdAt": {
"type": "string",
......@@ -361,10 +358,7 @@
"in": "query",
"required": false,
"schema": {
"type": "string",
"pattern": "^(\\d|[a-zA-Z]|_)+$",
"minLength": 1,
"description": "NGSI-LD Name"
"$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
}
},
{
......@@ -516,153 +510,7 @@
"const": "GeoProperty"
},
"value": {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "https://forge.etsi.org/gitlab/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": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/value/definitions/position"
}
}
},
{
"title": "MultiPoint",
"properties": {
"type": {
"enum": [
"MultiPoint"
]
},
"coordinates": {
"$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/value/definitions/positionArray"
}
}
},
{
"title": "LineString",
"properties": {
"type": {
"enum": [
"LineString"
]
},
"coordinates": {
"$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/value/definitions/lineString"
}
}
},
{
"title": "MultiLineString",
"properties": {
"type": {
"enum": [
"MultiLineString"
]
},
"coordinates": {
"type": "array",
"items": {
"$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/value/definitions/lineString"
}
}
}
},
{
"title": "Polygon",
"properties": {
"type": {
"enum": [
"Polygon"
]
},
"coordinates": {
"$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/value/definitions/polygon"
}
}
},
{
"title": "MultiPolygon",
"properties": {
"type": {
"enum": [
"MultiPolygon"
]
},
"coordinates": {
"type": "array",
"items": {
"$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/value/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": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/value/definitions/position"
}
},
"lineString": {
"description": "An array of two or more positions",
"allOf": [
{
"$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/value/definitions/positionArray"
},
{
"minItems": 2
}
]
},
"linearRing": {
"description": "An array of four positions where the first equals the last",
"allOf": [
{
"$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/value/definitions/positionArray"
},
{
"minItems": 4
}
]
},
"polygon": {
"description": "An array of linear rings",
"type": "array",
"items": {
"$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/value/definitions/linearRing"
}
}
}
"$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location"
},
"observedAt": {
"type": "string",
......@@ -949,7 +797,7 @@
"in": "path",
"required": true,
"schema": {
"$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/2/schema"
"$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
}
}
],
......@@ -1026,6 +874,1909 @@
}
}
}
},
"/subscriptions/": {
"get": {
"description": "Retrieves the subscriptions available in an NGSI-LD system",
"operationId": "retrieveSubscriptions",
"parameters": [
{
"name": "limit",
"description": "Pagination limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json;application/ld+json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
}
},
"examples": {
"simple": {
"externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/SubscriptionList-example.json"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
}
}
}
}
}
},
"post": {
"description": "Creates a new Subscription within an NGSI-LD system",
"operationId": "createSubscription",
"requestBody": {
"required": true,
"content": {
"application/json;application/ld+json": {
"schema": {
"allOf": [
{
"$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uri"
},
"type": {
"type": "string",
"const": "Subscription"
},
"notification": {
"type": "object",
"properties": {
"attributes": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"format": {
"type": "string"
},
"endpoint": {
"type": "object",
"required": [
"uri"
],
"properties": {
"uri": {
"type": "string",
"format": "uri"
},
"accept": {
"type": "string",
"enum": [
"application/json",
"application/ld+json"
]
}
}
},
"status": {
"type": "string",
"enum": [
"ok",
"failed"
]
},
"timesSent": {
"type": "number",
"minimum": 1
},
"lastNotification": {
"type": "string",
"format": "date-time"
},
"lastFailure": {
"type": "string",
"format": "date-time"
},
"lastSuccess": {
"type": "string",
"format": "date-time"
}
},
"required": [
"endpoint"
]
},
"status": {
"type": "string",
"enum": [
"active",
"paused",
"expired"
]
},
"createdAt": {
"$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt"
},
"modifiedAt": {
"$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt"
}
},
"allOf": [
{
"required": [
"id",
"type"
]
},
{
"anyOf": [
{
"required": [
"entities"
]
},
{
"required": [
"watchedAttributes"
]
}
]
}
]
}
]
}
}
}
},
"responses": {
"201": {
"description": "Created. Contains the resource URI of the created Subscription"
},
"400": {
"description": "Bad request",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
}
}
}
},
"409": {
"description": "Already exists",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
}
}
}
}
}
}
},
"/subscriptions/{subscriptionId}": {
"get": {
"description": "Retrieves a specific Subscription from an NGSI-LD system",
"operationId": "retrieveSubscription",
"parameters": [
{
"name": "subscriptionId",
"description": "Subscription Id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uri"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
},
"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": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
}
}
}
}
}
},
"patch": {
"description": "Updates a specific Subscription within an NGSI-LD system",
"operationId": "updateSubscription",
"parameters": [
{
"$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/get/parameters/0"
}
],
"requestBody": {
"required": true,
"content": {
"application/json;application/ld+json": {
"schema": {
"type": "object",
"properties": {
"@context": {
"$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/%40context"
},
"entities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uri"
},
"type": {
"$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
},
"idPattern": {
"type": "string",
"format": "regex"
}
},
"required": [
"type"
]
},
"minItems": 1
},
"name": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string",
"minLength": 1
},
"watchedAttributes": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
},
"uniqueItems": true
},
"timeInterval": {
"type": "number",
"minimum": 0
},
"expires": {
"type": "string",
"format": "date-time"
},
"isActive": {
"type": "boolean"
},
"throttling": {
"type": "number",
"minimum": 1
},
"q": {
"type": "string"
},
"geoQ": {
"type": "object",
"required": [
"geometry",
"coordinates",
"georel"
],
"properties": {
"georel": {
"$ref": "#/paths/~1entities~1/get/parameters/5/schema"
},
"coordinates": {
"$ref": "#/paths/~1entities~1/get/parameters/7/schema"
},
"geometry": {
"$ref": "#/paths/~1entities~1/get/parameters/6/schema"
}
}
},
"csf": {
"type": "string"
}
}
}
}
}
},
"responses": {
"204": {
"description": "No Content. The Subscription was updated successfully"
},
"400": {
"description": "Bad Request",
"content": {
"application/json;application/ld+json": {
"schema": {