summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/docs/openapi
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ncmp-rest/docs/openapi')
-rw-r--r--cps-ncmp-rest/docs/openapi/components.yaml108
-rwxr-xr-xcps-ncmp-rest/docs/openapi/ncmp.yml42
-rwxr-xr-xcps-ncmp-rest/docs/openapi/openapi.yml4
3 files changed, 67 insertions, 87 deletions
diff --git a/cps-ncmp-rest/docs/openapi/components.yaml b/cps-ncmp-rest/docs/openapi/components.yaml
index 427f083698..7ca09ceedb 100644
--- a/cps-ncmp-rest/docs/openapi/components.yaml
+++ b/cps-ncmp-rest/docs/openapi/components.yaml
@@ -86,7 +86,7 @@ components:
type: array
items:
type: string
- example: [my-cm-handle1, my-cm-handle2, my-cm-handle3]
+ example: [ my-cm-handle1, my-cm-handle2, my-cm-handle3 ]
DmiPluginRegistrationErrorResponse:
type: object
properties:
@@ -124,14 +124,14 @@ components:
type: string
example: my-cm-handle
cmHandleProperties:
- $ref: '#/components/schemas/RestCmHandleProperties'
+ $ref: '#/components/schemas/RestCmHandleProperties'
publicCmHandleProperties:
- $ref: '#/components/schemas/RestCmHandleProperties'
+ $ref: '#/components/schemas/RestCmHandleProperties'
RestCmHandleProperties:
- type: object
- additionalProperties:
- type: string
- example: my-property
+ type: object
+ additionalProperties:
+ type: string
+ example: my-property
#Response Schemas
RestModuleReference:
@@ -288,21 +288,21 @@ components:
examples:
dataSampleRequest:
- summary: Sample request
- description: Sample request body
- value:
- test:bookstore:
- bookstore-name: Chapters
- categories:
- - code: '01'
- name: SciFi
- books:
+ summary: Sample request
+ description: Sample request body
+ value:
+ test:bookstore:
+ bookstore-name: Chapters
+ categories:
+ - code: '01'
+ name: SciFi
+ books:
- authors:
- Iain M. Banks
- Ursula K. Le Guin
- - code: '02'
- name: kids
- books:
+ - code: '02'
+ name: kids
+ books:
- authors:
- Philip Pullman
@@ -351,22 +351,22 @@ components:
- Philip Pullman
dataSampleResponse:
- summary: Sample response
- description: Sample response for selecting 'sample 1'.
- value:
- bookstore:
- categories:
- - code: '01'
- books:
- - authors:
- - Iain M. Banks
- - Ursula K. Le Guin
- name: SciFi
- - code: '02'
- books:
- - authors:
- - Philip Pullman
- name: kids
+ summary: Sample response
+ description: Sample response for selecting 'sample 1'.
+ value:
+ bookstore:
+ categories:
+ - code: '01'
+ books:
+ - authors:
+ - Iain M. Banks
+ - Ursula K. Le Guin
+ name: SciFi
+ - code: '02'
+ books:
+ - authors:
+ - Philip Pullman
+ name: kids
allCmHandleQueryParameters:
value:
@@ -448,7 +448,7 @@ components:
includeDescendantsOptionInQuery:
name: include-descendants
in: query
- description: include-descendants
+ description: Determines if descendants are included in response
required: false
schema:
type: boolean
@@ -526,6 +526,14 @@ components:
type: string
default: application/json
example: application/yang-data+json
+ datastoreName:
+ name: ncmp-datastore-name
+ in: path
+ description: The type of the requested data
+ required: true
+ schema:
+ type: string
+ example: ncmp-datastore:operational
responses:
NotFound:
@@ -555,9 +563,9 @@ components:
schema:
$ref: '#/components/schemas/ErrorMessage'
example:
- status: 403
- message: Forbidden error message
- details: Forbidden error details
+ status: 403
+ message: Forbidden error message
+ details: Forbidden error details
BadRequest:
description: Bad Request
content:
@@ -565,9 +573,9 @@ components:
schema:
$ref: '#/components/schemas/ErrorMessage'
example:
- status: 400 BAD_REQUEST
- message: Bad request error message
- details: Bad request error details
+ status: 400 BAD_REQUEST
+ message: Bad request error message
+ details: Bad request error details
Conflict:
description: Conflict
content:
@@ -575,9 +583,9 @@ components:
schema:
$ref: '#/components/schemas/ErrorMessage'
example:
- status: 409 CONFLICT
- message: Conflict error message
- details: Conflict error details
+ status: 409 CONFLICT
+ message: Conflict error message
+ details: Conflict error details
NotImplemented:
description: The given path has not been implemented
content:
@@ -585,9 +593,9 @@ components:
schema:
$ref: '#/components/schemas/ErrorMessage'
example:
- status: 501
- message: Not implemented error message
- details: Not implemented error details
+ status: 501
+ message: Not implemented error message
+ details: Not implemented error details
Ok:
description: OK
content:
@@ -596,10 +604,10 @@ components:
type: object
Created:
description: Created
- content: {}
+ content: { }
NoContent:
description: No Content
- content: {}
+ content: { }
InternalServerError:
description: Internal Server Error
content:
diff --git a/cps-ncmp-rest/docs/openapi/ncmp.yml b/cps-ncmp-rest/docs/openapi/ncmp.yml
index 4266fc4152..5e22f773aa 100755
--- a/cps-ncmp-rest/docs/openapi/ncmp.yml
+++ b/cps-ncmp-rest/docs/openapi/ncmp.yml
@@ -17,18 +17,21 @@
#
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
-getResourceDataForPassthroughOperational:
+
+getResourceDataForCmHandle:
get:
tags:
- network-cm-proxy
- summary: Get resource data from pass-through operational for cm handle
- description: Get resource data from pass-through operational for given cm handle
- operationId: getResourceDataOperationalForCmHandle
+ summary: Get resource data for cm handle
+ description: Get resource data for given cm handle
+ operationId: getResourceDataForCmHandle
parameters:
+ - $ref: 'components.yaml#/components/parameters/datastoreName'
- $ref: 'components.yaml#/components/parameters/cmHandleInPath'
- $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery'
- $ref: 'components.yaml#/components/parameters/optionsParamInQuery'
- $ref: 'components.yaml#/components/parameters/topicParamInQuery'
+ - $ref: 'components.yaml#/components/parameters/includeDescendantsOptionInQuery'
responses:
200:
description: OK
@@ -51,37 +54,6 @@ getResourceDataForPassthroughOperational:
$ref: 'components.yaml#/components/responses/BadGateway'
resourceDataForPassthroughRunning:
- get:
- tags:
- - network-cm-proxy
- summary: Get resource data from pass-through running for cm handle
- description: Get resource data from pass-through running for given cm handle
- operationId: getResourceDataRunningForCmHandle
- parameters:
- - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
- - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery'
- - $ref: 'components.yaml#/components/parameters/optionsParamInQuery'
- - $ref: 'components.yaml#/components/parameters/topicParamInQuery'
- responses:
- 200:
- description: OK
- content:
- application/json:
- schema:
- type: object
- examples:
- dataSampleResponse:
- $ref: 'components.yaml#/components/examples/dataSampleResponse'
- 400:
- $ref: 'components.yaml#/components/responses/BadRequest'
- 401:
- $ref: 'components.yaml#/components/responses/Unauthorized'
- 403:
- $ref: 'components.yaml#/components/responses/Forbidden'
- 500:
- $ref: 'components.yaml#/components/responses/InternalServerError'
- 502:
- $ref: 'components.yaml#/components/responses/BadGateway'
post:
tags:
- network-cm-proxy
diff --git a/cps-ncmp-rest/docs/openapi/openapi.yml b/cps-ncmp-rest/docs/openapi/openapi.yml
index 8e020668a0..ed15fcd628 100755
--- a/cps-ncmp-rest/docs/openapi/openapi.yml
+++ b/cps-ncmp-rest/docs/openapi/openapi.yml
@@ -26,8 +26,8 @@ info:
servers:
- url: /ncmp
paths:
- /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-operational:
- $ref: 'ncmp.yml#/getResourceDataForPassthroughOperational'
+ /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'