From 1fabab11daa688a169fd2623cdc08c39232da10b Mon Sep 17 00:00:00 2001 From: JosephKeenan Date: Fri, 14 Jan 2022 12:37:45 +0000 Subject: [TECHDEBT] Align CPS Core REST API Specification and Implementation Issue-ID: CPS-822 Signed-off-by: JosephKeenan Change-Id: I3179194fb6d7d7416d4f7e75ef51f05b6de89c10 --- cps-rest/docs/openapi/cpsAdmin.yml | 14 ++++++-------- cps-rest/docs/openapi/cpsData.yml | 4 ++-- cps-rest/docs/openapi/cpsQuery.yml | 2 -- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/cps-rest/docs/openapi/cpsAdmin.yml b/cps-rest/docs/openapi/cpsAdmin.yml index 869cb6e724..96f097ffe1 100644 --- a/cps-rest/docs/openapi/cpsAdmin.yml +++ b/cps-rest/docs/openapi/cpsAdmin.yml @@ -28,12 +28,12 @@ dataspaces: responses: '201': $ref: 'components.yml#/components/responses/Created' - '400': - $ref: 'components.yml#/components/responses/BadRequest' '401': $ref: 'components.yml#/components/responses/Unauthorized' '403': $ref: 'components.yml#/components/responses/Forbidden' + '409': + $ref: 'components.yml#/components/responses/Conflict' delete: description: Delete a dataspace @@ -81,6 +81,8 @@ schemaSet: $ref: 'components.yml#/components/responses/Unauthorized' '403': $ref: 'components.yml#/components/responses/Forbidden' + '409': + $ref: 'components.yml#/components/responses/Conflict' schemaSetBySchemaSetName: get: @@ -105,8 +107,6 @@ schemaSetBySchemaSetName: $ref: 'components.yml#/components/responses/Unauthorized' '403': $ref: 'components.yml#/components/responses/Forbidden' - '404': - $ref: 'components.yml#/components/responses/NotFound' delete: description: Delete a schema set given a schema set name and a dataspace @@ -153,8 +153,6 @@ anchorsByDataspace: $ref: 'components.yml#/components/responses/Unauthorized' '403': $ref: 'components.yml#/components/responses/Forbidden' - '404': - $ref: 'components.yml#/components/responses/NotFound' post: description: Create a new anchor in the given dataspace @@ -175,6 +173,8 @@ anchorsByDataspace: $ref: 'components.yml#/components/responses/Unauthorized' '403': $ref: 'components.yml#/components/responses/Forbidden' + '409': + $ref: 'components.yml#/components/responses/Conflict' anchorByDataspaceAndAnchorName: get: @@ -199,8 +199,6 @@ anchorByDataspaceAndAnchorName: $ref: 'components.yml#/components/responses/Unauthorized' '403': $ref: 'components.yml#/components/responses/Forbidden' - '404': - $ref: 'components.yml#/components/responses/NotFound' delete: description: Delete an anchor given an anchor name and a dataspace diff --git a/cps-rest/docs/openapi/cpsData.yml b/cps-rest/docs/openapi/cpsData.yml index 15f8a1c71b..b47583b979 100644 --- a/cps-rest/docs/openapi/cpsData.yml +++ b/cps-rest/docs/openapi/cpsData.yml @@ -44,8 +44,6 @@ nodeByDataspaceAndAnchor: $ref: 'components.yml#/components/responses/Unauthorized' '403': $ref: 'components.yml#/components/responses/Forbidden' - '404': - $ref: 'components.yml#/components/responses/NotFound' x-codegen-request-body-name: xpath listElementByDataspaceAndAnchor: @@ -161,6 +159,8 @@ nodesByDataspaceAndAnchor: $ref: 'components.yml#/components/responses/Unauthorized' '403': $ref: 'components.yml#/components/responses/Forbidden' + '409': + $ref: 'components.yml#/components/responses/Conflict' patch: description: Update a data node leaves for a given dataspace and anchor and a parent node xpath diff --git a/cps-rest/docs/openapi/cpsQuery.yml b/cps-rest/docs/openapi/cpsQuery.yml index 4f938aa891..ce1087d89a 100644 --- a/cps-rest/docs/openapi/cpsQuery.yml +++ b/cps-rest/docs/openapi/cpsQuery.yml @@ -44,6 +44,4 @@ nodesByDataspaceAndAnchorAndCpsPath: $ref: 'components.yml#/components/responses/Unauthorized' '403': $ref: 'components.yml#/components/responses/Forbidden' - '404': - $ref: 'components.yml#/components/responses/NotFound' x-codegen-request-body-name: xpath -- cgit 1.2.3-korg