diff options
author | Rudrangi Anupriya <ra00745022@techmahindra.com> | 2024-11-06 22:20:11 +0530 |
---|---|---|
committer | Rudrangi Anupriya <ra00745022@techmahindra.com> | 2024-11-17 17:09:51 +0000 |
commit | 5baf570979a06ec52e40dfaf613bb74665a8d9ff (patch) | |
tree | f3626a781fa367764de2607b2eaf5ea54c557617 /cps-rest/docs | |
parent | 37962e3faca4f2306546c4f70d480b0c323d2c68 (diff) |
XML content support for only cps Query v2
Here to bring Support for XML Response Entity in query data nodes
- Add ContentTypeInheadr in cpsQueryV2.yml to support application/xml
- Add contentTypeInHeader parameter to accept xml in QueryRestController.java
- Implement logic to convert data to xml
- written testcase for above changes made
Issue-ID: CPS-2359
Change-Id: Ieb7eeb66ccbb03703626132c6d5c2eade0e7cb4b
Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
Diffstat (limited to 'cps-rest/docs')
-rw-r--r-- | cps-rest/docs/openapi/cpsQueryV2.yml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cps-rest/docs/openapi/cpsQueryV2.yml b/cps-rest/docs/openapi/cpsQueryV2.yml index 7f0ceff768..9aaa4193c3 100644 --- a/cps-rest/docs/openapi/cpsQueryV2.yml +++ b/cps-rest/docs/openapi/cpsQueryV2.yml @@ -1,5 +1,6 @@ # ============LICENSE_START======================================================= # Copyright (C) 2023 TechMahindra Ltd. +# Modifications Copyright (C) 2023-2024 TechMahindra Ltd. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,6 +29,7 @@ nodesByDataspaceAndAnchorAndCpsPath: - $ref: 'components.yml#/components/parameters/anchorNameInPath' - $ref: 'components.yml#/components/parameters/cpsPathInQuery' - $ref: 'components.yml#/components/parameters/descendantsInQuery' + - $ref: 'components.yml#/components/parameters/contentTypeInHeader' responses: '200': description: OK @@ -38,6 +40,14 @@ nodesByDataspaceAndAnchorAndCpsPath: examples: dataSample: $ref: 'components.yml#/components/examples/dataSample' + application/xml: + schema: + type: object + xml: + name: stores + examples: + dataSample: + $ref: 'components.yml#/components/examples/dataSampleXml' '400': $ref: 'components.yml#/components/responses/BadRequest' '403': |