From d6de3f32c47dd3223cb6952c9ba6675a085687fe Mon Sep 17 00:00:00 2001 From: Arpit Singh Date: Tue, 9 Jul 2024 17:14:02 +0530 Subject: Refactoring of CPS Delta APIs Refactoring of CPS delta APIs from two separate endpoints to a single endpoint. - GET: /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/deltaAnchors - POST: /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/deltaByPayload To new endpoint can perform two operatios as follows: - GET: /v2/dataspaces/{dataspace-name}/anchors/{source-anchor-name}/delta - POST: /v2/dataspaces/{dataspace-name}/anchors/{source-anchor-name}/delta Note: this patch only addresses the issue around refactoring of Delta endpoint to a singular well defined endpoint. A separate patch will be created to refactor the entire Delta feature out of CPS Data, into a separate interface namely CPS Delta Issue-ID: CPS-2310 Change-Id: Ic62c8308cf368b4378235597a11c476809a150b8 Signed-off-by: Arpit Singh --- cps-rest/docs/openapi/cpsDataV2.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'cps-rest/docs/openapi/cpsDataV2.yml') diff --git a/cps-rest/docs/openapi/cpsDataV2.yml b/cps-rest/docs/openapi/cpsDataV2.yml index a1433badf6..d5a8ef3891 100644 --- a/cps-rest/docs/openapi/cpsDataV2.yml +++ b/cps-rest/docs/openapi/cpsDataV2.yml @@ -46,7 +46,7 @@ nodeByDataspaceAndAnchor: $ref: 'components.yml#/components/responses/InternalServerError' x-codegen-request-body-name: xpath -deltaByDataspaceAndAnchors: +delta: get: description: Get delta between two anchors within a given dataspace tags: @@ -55,7 +55,7 @@ deltaByDataspaceAndAnchors: operationId: getDeltaByDataspaceAndAnchors parameters: - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - - $ref: 'components.yml#/components/parameters/anchorNameInPath' + - $ref: 'components.yml#/components/parameters/sourceAnchorNameInPath' - $ref: 'components.yml#/components/parameters/targetAnchorNameInQuery' - $ref: 'components.yml#/components/parameters/xpathInQuery' - $ref: 'components.yml#/components/parameters/descendantsInQuery' @@ -76,8 +76,6 @@ deltaByDataspaceAndAnchors: '500': $ref: 'components.yml#/components/responses/InternalServerError' x-codegen-request-body-name: xpath - -deltaByDataspaceAnchorAndPayload: post: description: Get delta between an anchor in a dataspace and JSON payload tags: @@ -86,7 +84,7 @@ deltaByDataspaceAnchorAndPayload: operationId: getDeltaByDataspaceAnchorAndPayload parameters: - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - - $ref: 'components.yml#/components/parameters/anchorNameInPath' + - $ref: 'components.yml#/components/parameters/sourceAnchorNameInPath' - $ref: 'components.yml#/components/parameters/xpathInQuery' requestBody: content: -- cgit 1.2.3-korg