Commit 8c0b23eb authored by canterafonsj's avatar canterafonsj
Browse files

Entities closer and closer

parent e588196b
{ {
"openapi": "3.0.1", "openapi": "3.0.1",
"info": { "info": {
"title": "NGSI-LD Entities", "title": "NGSI-LD Entities",
"version": "latest" "version": "latest"
}, },
"components": { "components": {
"parameters": { "parameters": {
"id": { "id": {
"name": "id", "name": "id",
"description": "Comma separated list of URIs to be retrieved", "description": "Comma separated list of URIs to be retrieved",
"in": "query", "in": "query",
"required": false, "required": false,
"schema": { "schema": {
"type": "string", "type": "string",
"format": "uri" "format": "uri"
} }
}, },
"type": { "type": {
"name": "type", "name": "type",
"description": "Comma separated list of Entity type names to be retrieved", "description": "Comma separated list of Entity type names to be retrieved",
"in": "query", "in": "query",
"required": false, "required": false,
"schema": { "schema": {
"type": "string", "type": "string",
"minLength": 1 "minLength": 1
} }
}, },
"idPattern": { "idPattern": {
"name": "idPattern", "name": "idPattern",
"description": "Regular expression that must be matched by Entity ids", "description": "Regular expression that must be matched by Entity ids",
"in": "query", "in": "query",
"required": false, "required": false,
"schema": { "schema": {
"type": "string", "type": "string",
"format": "regexp" "format": "regexp"
} }
}, },
"attrs": { "attrs": {
"name": "attrs", "name": "attrs",
"description": "Comma separated list of attribute names (properties or relationships) to be retrieved", "description": "Comma separated list of attribute names (properties or relationships) to be retrieved",
"in": "query", "in": "query",
"required": false, "required": false,
"schema": { "schema": {
"type": "string", "type": "string",
"minLength": 1 "minLength": 1
} }
}, },
"q": { "q": {
"name": "q", "name": "q",
"description": "Query", "description": "Query",
"in": "query", "in": "query",
"required": false, "required": false,
"schema": { "schema": {
"type": "string", "type": "string",
"minLength": 1 "minLength": 1
} }
}, },
"georel": { "georel": {
"name": "georel", "name": "georel",
"description": "Geo-relationship", "description": "Geo-relationship",
"in": "query", "in": "query",
"required": false, "required": false,
"schema": { "schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/georel" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/georel"
} }
}, },
"geometry": { "geometry": {
"name": "geometry", "name": "geometry",
"description": "Geometry", "description": "Geometry",
"in": "query", "in": "query",
"required": false, "required": false,
"schema": { "schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/geometry" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/geometry"
} }
}, },
"coordinates": { "coordinates": {
"name": "coordinates", "name": "coordinates",
"description": "Coordinates serialized as a string", "description": "Coordinates serialized as a string",
"in": "query", "in": "query",
"required": false, "required": false,
"schema": { "schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/coordinates" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/coordinates"
} }
}, },
"geoproperty": { "geoproperty": {
"name": "geoproperty", "name": "geoproperty",
"description": "The name of the property that contains the geo-spatial data that will be used to resolve the geoquery", "description": "The name of the property that contains the geo-spatial data that will be used to resolve the geoquery",
"in": "query", "in": "query",
"required": false, "required": false,
"schema": { "schema": {
"type": "string", "type": "string",
"minLength": 1 "minLength": 1
} }
}, },
"csf": { "csf": {
"name": "csf", "name": "csf",
"description": "Context Source Filter", "description": "Context Source Filter",
"in": "query", "in": "query",
"required": false, "required": false,
"schema": { "schema": {
"type": "string", "type": "string",
"minLength": 1 "minLength": 1
} }
} },
} "limit": {
}, "name": "limit",
"paths": { "description": "Pagination limit",
"/entities/": { "in": "query",
"get": { "required": false,
"description": "Retrieve a set of entities which matches a specific query from an NGSI-LD system", "schema": {
"operationId": "queryEntities", "type": "integer",
"parameters": [ "minimum": 1
{ }
"$ref": "#/components/parameters/id" }
}, }
{ },
"$ref": "#/components/parameters/idPattern" "paths": {
}, "/entities/": {
{ "get": {
"$ref": "#/components/parameters/type" "description": "Retrieve a set of entities which matches a specific query from an NGSI-LD system",
}, "operationId": "queryEntities",
{ "parameters": [{
"$ref": "#/components/parameters/attrs" "$ref": "#/components/parameters/id"
}, },
{ {
"$ref": "#/components/parameters/q" "$ref": "#/components/parameters/idPattern"
}, },
{ {
"$ref": "#/components/parameters/georel" "$ref": "#/components/parameters/type"
}, },
{ {
"$ref": "#/components/parameters/geometry" "$ref": "#/components/parameters/attrs"
}, },
{ {
"$ref": "#/components/parameters/coordinates" "$ref": "#/components/parameters/q"
}, },
{ {
"$ref": "#/components/parameters/geoproperty" "$ref": "#/components/parameters/georel"
}, },
{ {
"$ref": "#/components/parameters/csf" "$ref": "#/components/parameters/geometry"
} },
], {
"responses": { "$ref": "#/components/parameters/coordinates"
"200": { },
"description": "OK", {
"content": { "$ref": "#/components/parameters/geoproperty"
"application/json;application/ld+json": { },
"schema": { {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#" "$ref": "#/components/parameters/csf"
}, },
"examples": { {
"simple": { "$ref": "#/components/parameters/limit"
"externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/Entity-example.json" }
} ],
} "responses": {
} "200": {
} "description": "OK",
}, "content": {
"400": { "application/json;application/ld+json": {
"description": "Bad request", "schema": {
"content": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#"
"application/json": { },
"schema": { "examples": {
"$ref": "" "simple": {
} "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/Entity-example.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"
}
}
}
}
}
},
"post": {
"description": "Create a new Entity within an NGSI-LD system",
"operationId": "createEntity",
"requestBody": {
"required": true,
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#"
},
}
}
},
"responses": {
"201": {
"description": "Created. Contains the resource URI of the created Entity"
},
"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"
}
}
}
},
"409": {
"description": "Already exists",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
}
}
},
"422": {
"description": "Unprocessable Entity",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
}
}
}
}
}
}
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment