summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/docs/openapi/ncmp.yml
diff options
context:
space:
mode:
authorNiamh Core <niamh.core@est.tech>2021-12-13 15:05:19 +0000
committerGerrit Code Review <gerrit@onap.org>2021-12-13 15:05:19 +0000
commit4207fab422760b17187d37776ebc1867b995bba1 (patch)
tree8d80c6ae89a1a20de5eddbc895389169248c4577 /cps-ncmp-rest/docs/openapi/ncmp.yml
parent5af63eb8c5a32180f1c1d52048fe3390305dc4ac (diff)
parentd000733344658e79e8a384e724349bdb644d7c62 (diff)
Merge "Define response objects(schemas) in cps-ncmp"
Diffstat (limited to 'cps-ncmp-rest/docs/openapi/ncmp.yml')
-rwxr-xr-xcps-ncmp-rest/docs/openapi/ncmp.yml54
1 files changed, 36 insertions, 18 deletions
diff --git a/cps-ncmp-rest/docs/openapi/ncmp.yml b/cps-ncmp-rest/docs/openapi/ncmp.yml
index 673eb0b3cc..ece3c3a0d7 100755
--- a/cps-ncmp-rest/docs/openapi/ncmp.yml
+++ b/cps-ncmp-rest/docs/openapi/ncmp.yml
@@ -82,7 +82,10 @@ nodesByCmHandleAndXpath:
content:
application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSampleRequest:
+ $ref: 'components.yaml#/components/examples/dataSampleRequest'
responses:
201:
$ref: 'components.yaml#/components/responses/Created'
@@ -110,7 +113,10 @@ nodesByCmHandleAndXpath:
content:
application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSampleRequest:
+ $ref: 'components.yaml#/components/examples/dataSampleRequest'
responses:
200:
$ref: 'components.yaml#/components/responses/Ok'
@@ -138,7 +144,10 @@ nodesByCmHandleAndXpath:
content:
application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSampleRequest:
+ $ref: 'components.yaml#/components/examples/dataSampleRequest'
responses:
200:
$ref: 'components.yaml#/components/responses/Ok'
@@ -167,7 +176,10 @@ listNodeByCmHandleAndXpath:
content:
application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSampleRequest:
+ $ref: 'components.yaml#/components/examples/dataSampleRequest'
responses:
201:
$ref: 'components.yaml#/components/responses/Created'
@@ -256,13 +268,16 @@ resourceDataForPassthroughRunning:
content:
application/json:
schema:
- type: string
+ type: object
examples:
dataSampleRequest:
$ref: 'components.yaml#/components/examples/dataSampleRequest'
application/yang-data+json:
schema:
- type: string
+ type: object
+ examples:
+ dataSampleRequest:
+ $ref: 'components.yaml#/components/examples/dataSampleRequest'
responses:
201:
$ref: 'components.yaml#/components/responses/Created'
@@ -290,13 +305,16 @@ resourceDataForPassthroughRunning:
content:
application/json:
schema:
- type: string
+ type: object
examples:
dataSampleRequest:
$ref: 'components.yaml#/components/examples/dataSampleRequest'
application/yang-data+json:
schema:
- type: string
+ type: object
+ examples:
+ dataSampleRequest:
+ $ref: 'components.yaml#/components/examples/dataSampleRequest'
responses:
200:
$ref: 'components.yaml#/components/responses/Ok'
@@ -325,6 +343,9 @@ resourceDataForPassthroughRunning:
application/json:
schema:
type: object
+ examples:
+ dataSampleRequest:
+ $ref: 'components.yaml#/components/examples/dataSampleRequest'
responses:
200:
$ref: 'components.yaml#/components/responses/Ok'
@@ -352,7 +373,10 @@ resourceDataForPassthroughRunning:
content:
application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSampleRequest:
+ $ref: 'components.yaml#/components/examples/dataSampleRequest'
responses:
204:
$ref: 'components.yaml#/components/responses/NoContent'
@@ -381,15 +405,9 @@ fetchModuleReferencesByCmHandle:
content:
application/json:
schema:
- type: object
- examples:
- moduleReferencesResponse:
- summary: Sample response
- value:
- - moduleName: my-module-name
- revision: yyyy-mm-dd
- - moduleName: my-module-name-2
- revision: yyyy-mm-dd
+ type: array
+ items:
+ $ref: 'components.yaml#/components/schemas/ModuleReference'
400:
$ref: 'components.yaml#/components/responses/BadRequest'
401: