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

Incorrect parsing of Explode property when parsing a Swagger 2.0 spec #1756

Open
ghost opened this issue Jul 26, 2024 · 0 comments
Open

Incorrect parsing of Explode property when parsing a Swagger 2.0 spec #1756

ghost opened this issue Jul 26, 2024 · 0 comments
Assignees
Labels
type:bug A broken experience

Comments

@ghost
Copy link

ghost commented Jul 26, 2024

Describe the bug
When the Microsoft.OpenApi.Reader 1.6.13 is parsing a Swagger 2.0 spec, if it encounters the "collectionFormat" of csv for an array, it sets the Explode property to true instead of false.

OpenApi File To Reproduce
Add the OpenApi file you're using or a link to it as well as the steps to reproduce the current behavior.

Expected behavior
In the operation "Weather_GetHourlyForecast", one of the query parameters is Position which is an array whose "collectionFormat" is csv. Upon parsing, I would expect the Explode to be false and Style to be Form. For example, when the collectionFormat is ssv, the Explode is correctly parsed to be false and Style set to SpaceDelimited.

Screenshots/Code Snippets
Please find the image below which shows how the reader parses different collection formats
image

Additional context
Even though the default value of Explode is true when the Style is form, when the collection format is csv, it must be parsed as Explode false

@MaggieKimani1 MaggieKimani1 added the type:bug A broken experience label Aug 1, 2024
@MaggieKimani1 MaggieKimani1 self-assigned this Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

1 participant