From 6602d101cdfaa1de6d47b80f388c5fe17e57400d Mon Sep 17 00:00:00 2001 From: Jose Manuel Cantera Date: Thu, 22 Nov 2018 11:20:58 +0100 Subject: [PATCH] Batch operation result --- schema/BatchOperationResult.json | 39 ++++++++++------- spec/updated/entity-operations-spec.json | 56 ++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 16 deletions(-) create mode 100644 spec/updated/entity-operations-spec.json diff --git a/schema/BatchOperationResult.json b/schema/BatchOperationResult.json index 0cf9033..7f6fd2c 100644 --- a/schema/BatchOperationResult.json +++ b/schema/BatchOperationResult.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/schema#", - "id": "https://uri.etsi.org/ngsi-ld/schema/BatchOperationResult.json", + "id": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json", "title": "NGSI-LD Batch Operation Result", "description": "NGSI-LD Batch Operation Result", "definitions": { @@ -12,22 +12,29 @@ "error": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails" } - } - }, - "type": "object", - "properties": { - "success": { - "type": "array", - "items": { - "type": "string", - "format": "uri" - } }, - "error": { - "type": "array", - "items": { - "$ref": "#/definitions/BatchEntityError" + "BatchOperationResult": { + "type": "object", + "properties": { + "success": { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + }, + "error": { + "type": "array", + "items": { + "$ref": "#/definitions/BatchEntityError" + } + } } } - } + }, + "allOf": [ + { + "$ref": "#/definitions/BatchOperationResult" + } + ] } diff --git a/spec/updated/entity-operations-spec.json b/spec/updated/entity-operations-spec.json new file mode 100644 index 0000000..de78afb --- /dev/null +++ b/spec/updated/entity-operations-spec.json @@ -0,0 +1,56 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "NGSI-LD Entity Operations", + "version": "latest" + }, + "components": { + }, + "paths": { + "/entityOperations/create": { + "post": { + "description": "Batch Entity creation", + "operationId": "batchEntityCreation", + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult" + } + } + } + }, + "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" + } + } + } + }, + + } + } + }, + "/entityOperations/update": { + }, + "/entityOperations/upsert": { + }, + "/entityOperations/delete": { + } + } +} -- GitLab