You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I go to 'Try it Out' on the '/withlistresponse' operation and fill out items for the vals array, I get the default serialization behavior of csv in the request:
I believe that this is a misinterpretation of the default value of the style keyword within the encoding for a request body specified in the OpenAPI spec.
There appears to be no default set for the style field in swagger-ui (most recently this would have been from ##1500). The default value of style should be form, relevant part from the linked spec (emphasis mine):
Describes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The behavior follows the same values as query parameters, including default values
If you look at the parameterStyle property, the spec states:
Default values (based on value of in): for query - form;
If I take my example above and modify it slightly, you can see then that these 2 yaml snippets should be the exact same behavior:
Q&A (please complete the following information)
Content & configuration
Plug in the below yaml into https://editor.swagger.io/
Swagger/OpenAPI definition:
Swagger-Client usage:
N/A
Describe the bug you're encountering
When I go to 'Try it Out' on the '/withlistresponse' operation and fill out items for the
vals
array, I get the default serialization behavior of csv in the request:I believe that this is a misinterpretation of the default value of the
style
keyword within theencoding
for a request body specified in the OpenAPI spec.There appears to be no default set for the
style
field in swagger-ui (most recently this would have been from ##1500). The default value ofstyle
should beform
, relevant part from the linked spec (emphasis mine):If you look at the
parameterStyle
property, the spec states:If I take my example above and modify it slightly, you can see then that these 2 yaml snippets should be the exact same behavior:
Original:
Output is CSV:
style: form
, output is effectivelyexplode: true
with repeated parameters:To reproduce...
Steps to reproduce the behavior:
explode: false
in the encoding)Expected behavior
The defaults from the OpenAPI specification are respected
Screenshots
Given above
Additional context or thoughts
The text was updated successfully, but these errors were encountered: