You can translate the question and the replies:

How to set default values for web services parameters format_parameter and reduced_format_parameter

Using Denodo 7 2019 09 03 When publishing a web service I have set default representation to JSON and disabled all others. I import the service to Azure API Management and discover it says: * Default value must be present in the list of values Looking at the json generated I see: ``` "reduced_format_parameter": { "name": "$format", "in": "query", "description": "Defines the output format of the query", "required": false, "type": "string", "default": "XML", "enum": [ "JSON" ] }, ``` and later ``` "format_parameter": { "name": "$format", "in": "query", "description": "Defines the output format of the query", "required": false, "type": "string", "default": "HTML", "enum": [ "JSON" ] }, ``` Modifying the json allows the import - but now I must generate and modify the file rather than use the link. Is there a way to set these parameter defaults?
user
22-06-2021 18:39:37 -0400
code

3 Answers

Hi, As a first step, I would verify if the setting is done correctly. Here is the user manual for REST Web Services. [Selecting the Default / Available Representations](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/publication_of_web_services/publishing_rest_web_services/settings_tab_rest#selecting-the-default-available-representations) Also there is some case that default representation gets ignored(please see the section in the link for details) due to HTTP request header setting. In such a case, you may add “$format=json” as a GET parameter to get data in JSON format. Hope this helps!
Denodo Team
24-06-2021 04:41:10 -0400
code
I get that but I have set the default representation, saved, redeployed, and still the default in the generated *swagger*.json is incorrect. This is causing an issue in importing to Azure API Management and I believe it is a bug as I am prevented from using the link and instead must download modify and upload the swagger doc. I am not having any issues calling the API with forrect parameters. This is an issue importing web services with restricted representations even when the default is set. ![representation](https://imgur.com/a/k7SQ41U)
user
 Edited on: 03-11-2022 18:30:27 -0400
Hi, When a REST Web Service is exposed, Denodo Platform automatically includes Swagger/Open API documentation. With my experience, you cannot customize the contents to be displayed in the Swagger documentation. If you need more help and have a valid support account, you can open a new case in the Support Site so the Denodo team can help you. Hope this helps!
Denodo Team
02-07-2021 06:59:10 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here