-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Change the behavior of default parameter values #1258
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
How do you set default values, by the way? |
If you're referring to the spec, then here is an example (default value of "" for the api_key header parameter):
Please refer to https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#parameter-object for more information |
Thanks, sorry for the OT post by the way. |
Is there any discussion to add an Note - the behavior you described above about not sending when the default value is selected seems erroneous to me, in that if I happen to specify the default value from a dropdown then I think it should send with the value I intentionally selected. Is it better stated that the parameter shouldn't be sent by default with the default value, but rather by default it should not be sent at all? |
Closing as for an older version of the UI. |
Currently the UI displays and sends the default values of the parameters.
The default values are there for documentation purposes and should not be sent to the server.
We should add as flag that allows setting whether default values are sent or displayed only (should always be displayed for documentation), where I believe the default should be they are not sent. This would make the UI a better (even though basic) testing tool.
The challenge may be with non-text input such as drop downs and multi-selects, but even there we can check if it's the default value, just not send it.
The text was updated successfully, but these errors were encountered: