diff options
author | 2021-12-03 10:14:19 +0000 | |
---|---|---|
committer | 2021-12-03 10:14:19 +0000 | |
commit | 7c483c72e3643abb0d425f0092c15310c5359276 (patch) | |
tree | f23d3f3660d6c724604a40087e56149c5aa98db6 /cps-rest/docs/openapi/cpsData.yml | |
parent | 4314e7b8ffc0641b0907cf18ca57d329c11f87ed (diff) | |
parent | 5d8b24107ad579db89bcdad63476143f4a2db755 (diff) |
Merge "Adding examples in openapi for cps-core"
Diffstat (limited to 'cps-rest/docs/openapi/cpsData.yml')
-rw-r--r-- | cps-rest/docs/openapi/cpsData.yml | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/cps-rest/docs/openapi/cpsData.yml b/cps-rest/docs/openapi/cpsData.yml index 2b65ae440..15f8a1c71 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' |