summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/docs/openapi
diff options
context:
space:
mode:
authorsourabh_sourabh <sourabh.sourabh@est.tech>2023-05-09 14:34:59 +0100
committersourabh_sourabh <sourabh.sourabh@est.tech>2023-05-25 15:29:37 +0100
commitf232f30bede7d35c71db2d0201695a1416e37323 (patch)
tree9ed0a5a32d3ca34934b0f2622984a562e73fd8f2 /cps-ncmp-rest/docs/openapi
parente9ac24f8ad866f81d1ceace6d0b8f010930e9f74 (diff)
NCMP: Update existing Batch endpoint (Moving url param into rest body)
- NCMP batch endpoint is updated to accept details into request payload. - Removed unused code of previous impl. Issue-ID: CPS-1635 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ic290b750557da06b861c5a4a9bb12debc495ec2e Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Diffstat (limited to 'cps-ncmp-rest/docs/openapi')
-rw-r--r--cps-ncmp-rest/docs/openapi/components.yaml37
-rwxr-xr-xcps-ncmp-rest/docs/openapi/ncmp.yml6
-rwxr-xr-xcps-ncmp-rest/docs/openapi/openapi.yml2
3 files changed, 39 insertions, 6 deletions
diff --git a/cps-ncmp-rest/docs/openapi/components.yaml b/cps-ncmp-rest/docs/openapi/components.yaml
index 7fc1063a12..2781f572f2 100644
--- a/cps-ncmp-rest/docs/openapi/components.yaml
+++ b/cps-ncmp-rest/docs/openapi/components.yaml
@@ -285,6 +285,43 @@ components:
properties:
state:
$ref: '#/components/schemas/CmHandleCompositeState'
+ # Batch Request Schemas
+ ResourceDataBatchRequest:
+ type: object
+ title: get resource data for given array of operations
+ properties:
+ operations:
+ type: array
+ items:
+ type: object
+ $ref: '#/components/schemas/BatchOperationDefinition'
+ description: contains batch request details
+ BatchOperationDefinition:
+ required:
+ - operation
+ - datastore
+ - operationId
+ properties:
+ operation:
+ type: string
+ example: 'read'
+ operationId:
+ type: string
+ example: '12'
+ datastore:
+ type: string
+ example: 'ncmp-datastore:passthrough-operational'
+ options:
+ type: string
+ example: '(fields=schemas/schema)'
+ resourceIdentifier:
+ type: string
+ example: 'parent/child'
+ targetIds:
+ type: array
+ items:
+ type: string
+ example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
examples:
dataSampleRequest:
diff --git a/cps-ncmp-rest/docs/openapi/ncmp.yml b/cps-ncmp-rest/docs/openapi/ncmp.yml
index 2b70d94892..957a3b8735 100755
--- a/cps-ncmp-rest/docs/openapi/ncmp.yml
+++ b/cps-ncmp-rest/docs/openapi/ncmp.yml
@@ -202,17 +202,13 @@ getResourceDataForCmHandleBatch:
description: This request will be handled asynchronously using messaging to the supplied topic. The rest response will be an acknowledge with a requestId to identify the relevant messages.
operationId: getResourceDataForCmHandleBatch
parameters:
- - $ref: 'components.yaml#/components/parameters/datastoreName'
- - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery'
- - $ref: 'components.yaml#/components/parameters/optionsParamInQuery'
- $ref: 'components.yaml#/components/parameters/requiredTopicParamInQuery'
- - $ref: 'components.yaml#/components/parameters/includeDescendantsOptionInQuery'
requestBody:
required: true
content:
application/json:
schema:
- type: object
+ $ref: 'components.yaml#/components/schemas/ResourceDataBatchRequest'
responses:
200:
description: OK
diff --git a/cps-ncmp-rest/docs/openapi/openapi.yml b/cps-ncmp-rest/docs/openapi/openapi.yml
index 5b4c0d3496..b63b568234 100755
--- a/cps-ncmp-rest/docs/openapi/openapi.yml
+++ b/cps-ncmp-rest/docs/openapi/openapi.yml
@@ -34,7 +34,7 @@ paths:
/v1/ch/{cm-handle}/data/ds/{datastore-name}:
$ref: 'ncmp.yml#/resourceDataForCmHandle'
- /v1/batch/data/ds/{datastore-name}:
+ /v1/data:
$ref: 'ncmp.yml#/getResourceDataForCmHandleBatch'
/v1/ch/{cm-handle}/data/ds/{datastore-name}/query: