From 5d8b24107ad579db89bcdad63476143f4a2db755 Mon Sep 17 00:00:00 2001 From: "puthuparambil.aditya" Date: Wed, 24 Nov 2021 13:35:10 +0000 Subject: 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 Change-Id: If6dd5bb48df4e1bbf1026eaadf315df8f972e282 --- cps-rest/docs/openapi/cpsQuery.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cps-rest/docs/openapi/cpsQuery.yml') diff --git a/cps-rest/docs/openapi/cpsQuery.yml b/cps-rest/docs/openapi/cpsQuery.yml index f45f3f41a..4f938aa89 100644 --- a/cps-rest/docs/openapi/cpsQuery.yml +++ b/cps-rest/docs/openapi/cpsQuery.yml @@ -30,7 +30,14 @@ nodesByDataspaceAndAnchorAndCpsPath: - $ref: 'components.yml#/components/parameters/includeDescendantsOptionInQuery' responses: '200': - $ref: 'components.yml#/components/responses/Ok' + description: OK + content: + application/json: + schema: + type: object + examples: + dataSampleResponse: + $ref: 'components.yml#/components/examples/dataSampleResponse' '400': $ref: 'components.yml#/components/responses/BadRequest' '401': -- cgit 1.2.3-korg