-
Notifications
You must be signed in to change notification settings - Fork 261
Description
Describe the bug
The Explode
property of the OpenApiParameter
class is always set to true, regardless of whether the collectionFormat
property is explicitly set to csv
or omitted when parsing query string parameters of array type in OpenAPI v2.0 documents.
To Reproduce
- Create an OpenAPI document of version 2.0.
- Add any operation with two query string parameters of array type: one without the
collectionFormat
property and the other with the property explicitly set tocsv
. See the screenshot below. - Parse/read the document using the
openApiReader.ReadAsync
method.
Actual behavior
The Explode
property value for both parameters is true. See the screenshot below.
Expected behavior
The Explode
property value should be false for both parameters. For the parameter with the omitted collectionFormat
property, the Explode
property should also be false because, according to the OpenAPI 2.0 spec, the default value for the collectionFormat
is csv
, which implies that it should not be "exploded" (i.e., one parameter with comma-separated values should be used), as far as I understand it.
Additional context
The issue was discovered while exploring serialization details for query string parameters. No customers have been impacted by it so far.