summaryrefslogtreecommitdiffstats
path: root/openapi
diff options
context:
space:
mode:
authorsourabh_sourabh <sourabh.sourabh@est.tech>2023-03-13 15:49:35 +0000
committersourabh_sourabh <sourabh.sourabh@est.tech>2023-03-15 11:36:00 +0000
commite648aba2d39855337b6a5c39000dc6c611d09191 (patch)
tree8f64e9c8b07ffcaffdc6f3d5d741e1ac30dd9115 /openapi
parentf07370606ca12b70566cfbe663c9801d41044f34 (diff)
Merge existing dmi-plugin of data access passthrough endpoints
- Introduced datastore enum and execute existing method based on given datastore. Issue-ID: CPS-1550 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Idf908a89dce2f5f1a155d630e04ba7869328b94d Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Diffstat (limited to 'openapi')
-rw-r--r--openapi/components.yml8
-rw-r--r--openapi/openapi.yml55
2 files changed, 15 insertions, 48 deletions
diff --git a/openapi/components.yml b/openapi/components.yml
index 6124d647..1e35c028 100644
--- a/openapi/components.yml
+++ b/openapi/components.yml
@@ -213,6 +213,14 @@ components:
examples:
sample1:
value: my-topic-name
+ datastoreName:
+ name: datastore-name
+ in: path
+ description: The type of the requested data
+ required: true
+ schema:
+ type: string
+ example: ncmp-datastore:passthrough-operational or ncmp-datastore:passthrough-running
security:
- basicAuth: [] \ No newline at end of file
diff --git a/openapi/openapi.yml b/openapi/openapi.yml
index 6e0e8ae6..38d5cef5 100644
--- a/openapi/openapi.yml
+++ b/openapi/openapi.yml
@@ -115,20 +115,21 @@ paths:
'500':
$ref: 'components.yml#/components/responses/ServerError'
- /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-operational:
+ /v1/ch/{cmHandle}/data/ds/{datastore-name}:
post:
tags:
- dmi-plugin
- summary: Get resource data from passthrough-operational for cm handle
- description: Get resource data from passthrough-operational for cm handle. Will support read operations only.
- operationId: dataAccessPassthroughOperational
+ summary: Get resource data from passthrough operational or running for cm handles
+ description: Get resource data from passthrough operational or running for cm handles
+ operationId: dataAccessPassthrough
parameters:
+ - $ref: 'components.yml#/components/parameters/datastoreName'
- $ref: 'components.yml#/components/parameters/cmHandleInPath'
- $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery'
- $ref: 'components.yml#/components/parameters/optionsParamInQuery'
- $ref: 'components.yml#/components/parameters/topicParamInQuery'
requestBody:
- description: Operational body
+ description: Contains collection of cm handles with it's private properties and requestId
content:
application/json:
schema:
@@ -147,46 +148,4 @@ paths:
'400':
$ref: 'components.yml#/components/responses/BadRequest'
'500':
- $ref: 'components.yml#/components/responses/ServerError'
-
- /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running:
- post:
- tags:
- - dmi-plugin
- summary: Get, Create or Update request for data passthrough-running for a cm-handle
- description: Post request to Get, Create or to Update resource data for a cm-handle. Since all requests need to include additional information in a request body HTTP Post is used for all use cases and the actual operation is defined in the request body instead.
- operationId: dataAccessPassthroughRunning
- parameters:
- - $ref: 'components.yml#/components/parameters/cmHandleInPath'
- - $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery'
- - $ref: 'components.yml#/components/parameters/optionsParamInQuery'
- - $ref: 'components.yml#/components/parameters/topicParamInQuery'
- requestBody:
- content:
- application/json:
- schema:
- $ref: 'components.yml#/components/schemas/DataAccessRequest'
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- type: object
- example:
- - yangSource: my-yang-source
- moduleName: my-module-name
- revision: my-revision
- '201':
- description: Created
- content:
- text/plain:
- schema:
- type: string
- example: my-resource
- '204':
- $ref: 'components.yml#/components/responses/NoContent'
- '400':
- $ref: 'components.yml#/components/responses/BadRequest'
- '500':
- $ref: 'components.yml#/components/responses/ServerError'
+ $ref: 'components.yml#/components/responses/ServerError' \ No newline at end of file