From dfcc95236daf7d45687fa42446a7d236ac12637e Mon Sep 17 00:00:00 2001 From: Rudrangi Anupriya Date: Wed, 27 Nov 2024 23:49:42 +0530 Subject: XML content support on Replace list content Here to bring Support for XML Response Entity in Replace List content - Add ContentTypeInheadr in cpsData.yml to support application/xml - Add contentTypeInHeader parameter to accept xml in DataRestController.java - Modify the code return xml Data - written testcase for above changes made Issue-ID: CPS-2411 Change-Id: Ibb7ffb66ccdd03703266123c6d5c2eade0e7cb4a Signed-off-by: Rudrangi Anupriya --- docs/api/swagger/cps/openapi.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'docs/api/swagger') diff --git a/docs/api/swagger/cps/openapi.yaml b/docs/api/swagger/cps/openapi.yaml index 812a2e4e60..fea68480ab 100644 --- a/docs/api/swagger/cps/openapi.yaml +++ b/docs/api/swagger/cps/openapi.yaml @@ -1927,6 +1927,16 @@ paths: schema: example: 2021-03-21T00:10:34.030-0100 type: string + - description: Content type in header + in: header + name: Content-Type + required: false + schema: + default: application/json + enum: + - application/json + - application/xml + type: string requestBody: content: application/json: @@ -1934,8 +1944,17 @@ paths: dataSample: $ref: '#/components/examples/dataSample' value: null + schema: + type: string + application/xml: + examples: + dataSample: + $ref: '#/components/examples/dataSampleXml' + value: null schema: type: object + xml: + name: stores required: true responses: "200": -- cgit 1.2.3-korg