From 897686f96f49dc4405eb3e29f2a6218dc8040c97 Mon Sep 17 00:00:00 2001 From: "rajesh.kumar" Date: Wed, 14 Dec 2022 08:13:29 +0000 Subject: API versioning supported and added different versions for POST APIs Issue-ID: CPS-1189 Change-ID: I73f97f986a817d423f92f8d922dcd9647b1214aa Signed-off-by: rajesh.kumar --- cps-rest/docs/openapi/cpsData.yml | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) (limited to 'cps-rest/docs/openapi/cpsData.yml') diff --git a/cps-rest/docs/openapi/cpsData.yml b/cps-rest/docs/openapi/cpsData.yml index 265ee23ad..9d940c3f8 100644 --- a/cps-rest/docs/openapi/cpsData.yml +++ b/cps-rest/docs/openapi/cpsData.yml @@ -1,6 +1,7 @@ # ============LICENSE_START======================================================= # Copyright (c) 2021-2022 Bell Canada. # Modifications Copyright (C) 2021-2022 Nordix Foundation +# Modifications Copyright (C) 2022 TechMahindra Ltd. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,6 +26,7 @@ nodeByDataspaceAndAnchor: summary: Get a node operationId: getNodeByDataspaceAndAnchor parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - $ref: 'components.yml#/components/parameters/anchorNameInPath' - $ref: 'components.yml#/components/parameters/xpathInQuery' @@ -57,6 +59,7 @@ listElementByDataspaceAndAnchor: summary: Add list element(s) operationId: addListElements parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - $ref: 'components.yml#/components/parameters/anchorNameInPath' - $ref: 'components.yml#/components/parameters/requiredXpathInQuery' @@ -88,6 +91,7 @@ listElementByDataspaceAndAnchor: summary: Replace list content operationId: replaceListContent parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - $ref: 'components.yml#/components/parameters/anchorNameInPath' - $ref: 'components.yml#/components/parameters/requiredXpathInQuery' @@ -112,29 +116,6 @@ listElementByDataspaceAndAnchor: $ref: 'components.yml#/components/responses/Forbidden' '500': $ref: 'components.yml#/components/responses/InternalServerError' - delete: - description: Delete one or all list element(s) for a given anchor and dataspace - deprecated: true - tags: - - cps-data - summary: Delete one or all list element(s) - operationId: deleteListOrListElement - parameters: - - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - - $ref: 'components.yml#/components/parameters/anchorNameInPath' - - $ref: 'components.yml#/components/parameters/requiredXpathInQuery' - - $ref: 'components.yml#/components/parameters/observedTimestampInQuery' - responses: - '204': - $ref: 'components.yml#/components/responses/NoContent' - '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' nodesByDataspaceAndAnchor: post: @@ -144,6 +125,7 @@ nodesByDataspaceAndAnchor: summary: Create a node operationId: createNode parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - $ref: 'components.yml#/components/parameters/anchorNameInPath' - $ref: 'components.yml#/components/parameters/xpathInQuery' @@ -177,6 +159,7 @@ nodesByDataspaceAndAnchor: summary: Update node leaves operationId: updateNodeLeaves parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - $ref: 'components.yml#/components/parameters/anchorNameInPath' - $ref: 'components.yml#/components/parameters/xpathInQuery' @@ -208,6 +191,7 @@ nodesByDataspaceAndAnchor: summary: Delete a data node operationId: deleteDataNode parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - $ref: 'components.yml#/components/parameters/anchorNameInPath' - $ref: 'components.yml#/components/parameters/xpathInQuery' @@ -230,6 +214,7 @@ nodesByDataspaceAndAnchor: summary: Replace a node with descendants operationId: replaceNode parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - $ref: 'components.yml#/components/parameters/anchorNameInPath' - $ref: 'components.yml#/components/parameters/xpathInQuery' -- cgit 1.2.3-korg