diff options
Diffstat (limited to 'cps-rest/docs')
-rw-r--r-- | cps-rest/docs/openapi/components.yml | 26 | ||||
-rw-r--r-- | cps-rest/docs/openapi/cpsDataV2.yml | 33 | ||||
-rw-r--r-- | cps-rest/docs/openapi/openapi.yml | 3 |
3 files changed, 62 insertions, 0 deletions
diff --git a/cps-rest/docs/openapi/components.yml b/cps-rest/docs/openapi/components.yml index a3016ce762..c1b111bfab 100644 --- a/cps-rest/docs/openapi/components.yml +++ b/cps-rest/docs/openapi/components.yml @@ -137,6 +137,24 @@ components: name: SciFi - code: 02 name: kids + deltaReportSample: + value: + - action: "ADD" + xpath: "/bookstore/categories/[@code=3]" + target-data: + code: 3, + name: "kidz" + - action: "REMOVE" + xpath: "/bookstore/categories/[@code=1]" + source-data: + code: 1, + name: "Fiction" + - action: "UPDATE" + xpath: "/bookstore/categories/[@code=2]" + source-data: + name: "Funny" + target-data: + name: "Comic" parameters: dataspaceNameInQuery: @@ -187,6 +205,14 @@ components: schema: type: string example: my-anchor + targetAnchorNameInQuery: + name: target-anchor-name + in: query + description: target-anchor-name + required: true + schema: + type: string + example: my-anchor xpathInQuery: name: xpath in: query diff --git a/cps-rest/docs/openapi/cpsDataV2.yml b/cps-rest/docs/openapi/cpsDataV2.yml index ad0c299d70..c7629b70ec 100644 --- a/cps-rest/docs/openapi/cpsDataV2.yml +++ b/cps-rest/docs/openapi/cpsDataV2.yml @@ -46,4 +46,37 @@ nodeByDataspaceAndAnchor: $ref: 'components.yml#/components/responses/Forbidden' '500': $ref: 'components.yml#/components/responses/InternalServerError' + x-codegen-request-body-name: xpath + +deltaByDataspaceAndAnchors: + get: + description: Get delta between two anchors within a given dataspace + tags: + - cps-data + summary: Get delta between anchors in the same dataspace + operationId: getDeltaByDataspaceAndAnchors + parameters: + - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' + - $ref: 'components.yml#/components/parameters/anchorNameInPath' + - $ref: 'components.yml#/components/parameters/targetAnchorNameInQuery' + - $ref: 'components.yml#/components/parameters/xpathInQuery' + - $ref: 'components.yml#/components/parameters/descendantsInQuery' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + examples: + dataSample: + $ref: 'components.yml#/components/examples/deltaReportSample' + '400': + $ref: 'components.yml#/components/responses/BadRequest' + '401': + $ref: 'components.yml#/components/responses/Unauthorized' + '403': + $ref: 'components.yml#/components/responses/Forbidden' + '500': + $ref: 'components.yml#/components/responses/InternalServerError' x-codegen-request-body-name: xpath
\ No newline at end of file diff --git a/cps-rest/docs/openapi/openapi.yml b/cps-rest/docs/openapi/openapi.yml index 4bbf9f0fb6..f29335a0a9 100644 --- a/cps-rest/docs/openapi/openapi.yml +++ b/cps-rest/docs/openapi/openapi.yml @@ -104,6 +104,9 @@ paths: /{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes: $ref: 'cpsData.yml#/listElementByDataspaceAndAnchor' + /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/delta: + $ref: 'cpsDataV2.yml#/deltaByDataspaceAndAnchors' + /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query: $ref: 'cpsQueryV1Deprecated.yml#/nodesByDataspaceAndAnchorAndCpsPath' |