summaryrefslogtreecommitdiffstats
path: root/cps-rest/docs/openapi/cpsData.yml
diff options
context:
space:
mode:
authorputhuparambil.aditya <aditya.puthuparambil@bell.ca>2021-11-24 13:35:10 +0000
committerputhuparambil.aditya <aditya.puthuparambil@bell.ca>2021-12-02 13:48:29 +0000
commit5d8b24107ad579db89bcdad63476143f4a2db755 (patch)
tree9892587684f24f7559c1c93d61c173c875559693 /cps-rest/docs/openapi/cpsData.yml
parenta84a4aa84fd22af9b89424d776a18a98d7515bd2 (diff)
Adding examples in openapi for cps-core
1. Added examples for all parameters, request body and response body 2. Changed the response/request type to Object from String for all json objects 3. Passed json format data in all tests 4. PUT and PATCH operations at present return empty response, hence examples are changed to be in sync Issue-ID: CPS-780 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: If6dd5bb48df4e1bbf1026eaadf315df8f972e282
Diffstat (limited to 'cps-rest/docs/openapi/cpsData.yml')
-rw-r--r--cps-rest/docs/openapi/cpsData.yml31
1 files changed, 24 insertions, 7 deletions
diff --git a/cps-rest/docs/openapi/cpsData.yml b/cps-rest/docs/openapi/cpsData.yml
index 2b65ae4400..15f8a1c71b 100644
--- a/cps-rest/docs/openapi/cpsData.yml
+++ b/cps-rest/docs/openapi/cpsData.yml
@@ -35,7 +35,9 @@ nodeByDataspaceAndAnchor:
application/json:
schema:
type: object
- example: { "child": my_child,"leafList": "leafListElement1, leafListElement2", "leaf": my_leaf }
+ examples:
+ dataSampleResponse:
+ $ref: 'components.yml#/components/examples/dataSampleResponse'
'400':
$ref: 'components.yml#/components/responses/BadRequest'
'401':
@@ -63,7 +65,10 @@ listElementByDataspaceAndAnchor:
content:
application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSampleRequest:
+ $ref: 'components.yml#/components/examples/dataSampleRequest'
responses:
'201':
$ref: 'components.yml#/components/responses/Created'
@@ -90,10 +95,13 @@ listElementByDataspaceAndAnchor:
content:
application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSampleRequest:
+ $ref: 'components.yml#/components/examples/dataSampleRequest'
responses:
'200':
- $ref: 'components.yml#/components/responses/Created'
+ $ref: 'components.yml#/components/responses/Ok'
'400':
$ref: 'components.yml#/components/responses/BadRequest'
'401':
@@ -140,7 +148,10 @@ nodesByDataspaceAndAnchor:
content:
application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSampleRequest:
+ $ref: 'components.yml#/components/examples/dataSampleRequest'
responses:
'201':
$ref: 'components.yml#/components/responses/Created'
@@ -167,7 +178,10 @@ nodesByDataspaceAndAnchor:
content:
application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSampleRequest:
+ $ref: 'components.yml#/components/examples/dataSampleRequest'
responses:
'200':
$ref: 'components.yml#/components/responses/Ok'
@@ -216,7 +230,10 @@ nodesByDataspaceAndAnchor:
content:
application/json:
schema:
- type: string
+ type: object
+ examples:
+ dataSampleRequest:
+ $ref: 'components.yml#/components/examples/dataSampleRequest'
responses:
'200':
$ref: 'components.yml#/components/responses/Ok'