Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OpenAPI 2.0] The "Explode" property value is always true for query string parameters of array type. #1340

Closed
SergeyMenshykh opened this issue Sep 13, 2023 · 1 comment

Comments

@SergeyMenshykh
Copy link
Member

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

  1. Create an OpenAPI document of version 2.0.
  2. Add any operation with two query string parameters of array type: one without the collectionFormat property and the other with the property explicitly set to csv. See the screenshot below.
  3. 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.

Screenshots/Code Snippets
image
image
image

Additional context
The issue was discovered while exploring serialization details for query string parameters. No customers have been impacted by it so far.

@baywet
Copy link
Member

baywet commented Feb 27, 2025

Hey @SergeyMenshykh
Thank you for your patience.

I have actually fixed that as part of #2082 and #2079. (in v2 previews)

Closing.

@baywet baywet closed this as completed Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants