-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix array parameter explosion check #5158
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
Conversation
52b114b
to
5596ef2
Compare
5596ef2
to
2b32baa
Compare
@RicoSuter This is a breaking change, and it is implemented incorrectly as well. With this change, the nswag generator changes the way it generated a C# client from a swagger doc. I have endpoints with query parameters that are arrays, and before this change they would correctly generate as ?myArray=val1&myArray=val2&myArray=val3, but now they generate as ?myArray=val1,val2,val3. Per the documentation, "When style is form, the default value is true. For all other styles, the default value is false." If you then read on the Style property, the docs say "Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form.", so, for query parameters the default style is form, which means the default value of explode should be true, as it was before, but with this PR merged in that has changed such that the default value is now false, breaking existing frameworks that use nswag for client library generation. Please have someone fix this breaking change so that query parameters work as they should per the documentation. cc: @lahma |
@KirkMunroSagent can you be the one? A PR with new test coverage showing the desired way of working. |
I'm on vacation, so there's no likelihood that I'll have time for this anytime soon. This PR is a breaking change and should be reverted. It goes against the documentation, so the simplest way to fix this issue that didn't exist before is to create another PR that reverts this set of changes and then leave it until someone can re-do them properly while respecting the documentation. |
we also ran into this issue. |
Same here. The current version 14.4.0 is not generating correct c# code for array parameters. |
Hello, Thanks |
Hello, Thanks |
fixes #5133