From 440dc8aab179f6c8451683f53b019ccd8bd60bdf Mon Sep 17 00:00:00 2001 From: bmiklos Date: Mon, 5 Sep 2022 18:25:46 +0200 Subject: Handle invalid operations on merged datastore endpoint - Move the other endpoints under the same thats handling the get - Add exceptions to handle invalid cases - Add new tests for testing the invalid cases Issue-ID: CPS-1001 Issue-ID: CPS-1219 Change-Id: I26fd57b5921f976cde7089b4cf1e8c0e5d8dc43b Signed-off-by: bmiklos --- cps-ncmp-rest/docs/openapi/ncmp.yml | 7 +++++-- cps-ncmp-rest/docs/openapi/openapi.yml | 5 +---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'cps-ncmp-rest/docs') diff --git a/cps-ncmp-rest/docs/openapi/ncmp.yml b/cps-ncmp-rest/docs/openapi/ncmp.yml index 5e22f773aa..38db26f470 100755 --- a/cps-ncmp-rest/docs/openapi/ncmp.yml +++ b/cps-ncmp-rest/docs/openapi/ncmp.yml @@ -18,7 +18,7 @@ # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END========================================================= -getResourceDataForCmHandle: +resourceDataForCmHandle: get: tags: - network-cm-proxy @@ -53,7 +53,6 @@ getResourceDataForCmHandle: 502: $ref: 'components.yaml#/components/responses/BadGateway' -resourceDataForPassthroughRunning: post: tags: - network-cm-proxy @@ -61,6 +60,7 @@ resourceDataForPassthroughRunning: description: create resource data from pass-through running for given cm handle operationId: createResourceDataRunningForCmHandle parameters: + - $ref: 'components.yaml#/components/parameters/datastoreName' - $ref: 'components.yaml#/components/parameters/cmHandleInPath' - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery' - $ref: 'components.yaml#/components/parameters/contentParamInHeader' @@ -100,6 +100,7 @@ resourceDataForPassthroughRunning: description: Update resource data from pass-through running for the given cm handle operationId: updateResourceDataRunningForCmHandle parameters: + - $ref: 'components.yaml#/components/parameters/datastoreName' - $ref: 'components.yaml#/components/parameters/cmHandleInPath' - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery' - $ref: 'components.yaml#/components/parameters/contentParamInHeader' @@ -139,6 +140,7 @@ resourceDataForPassthroughRunning: description: Patch resource data from pass-through running for the given cm handle operationId: patchResourceDataRunningForCmHandle parameters: + - $ref: 'components.yaml#/components/parameters/datastoreName' - $ref: 'components.yaml#/components/parameters/cmHandleInPath' - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery' - $ref: 'components.yaml#/components/parameters/contentParamInHeader' @@ -172,6 +174,7 @@ resourceDataForPassthroughRunning: description: Delete resource data from pass-through running for a given cm handle operationId: deleteResourceDataRunningForCmHandle parameters: + - $ref: 'components.yaml#/components/parameters/datastoreName' - $ref: 'components.yaml#/components/parameters/cmHandleInPath' - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery' - $ref: 'components.yaml#/components/parameters/contentParamInHeader' diff --git a/cps-ncmp-rest/docs/openapi/openapi.yml b/cps-ncmp-rest/docs/openapi/openapi.yml index ed15fcd628..4c546beb26 100755 --- a/cps-ncmp-rest/docs/openapi/openapi.yml +++ b/cps-ncmp-rest/docs/openapi/openapi.yml @@ -27,10 +27,7 @@ servers: - url: /ncmp paths: /v1/ch/{cm-handle}/data/ds/{ncmp-datastore-name}: - $ref: 'ncmp.yml#/getResourceDataForCmHandle' - - /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-running: - $ref: 'ncmp.yml#/resourceDataForPassthroughRunning' + $ref: 'ncmp.yml#/resourceDataForCmHandle' /v1/ch/{cm-handle}/modules: $ref: 'ncmp.yml#/fetchModuleReferencesByCmHandle' -- cgit 1.2.3-korg