-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[BUG][JAVA][webclient] query param of type array handled as non explode #20127
Labels
Comments
CaptainAye
added a commit
to CaptainAye/openapi-generator
that referenced
this issue
Nov 24, 2024
…ased on the selected style (OpenAPITools#20127)
CaptainAye
added a commit
to CaptainAye/openapi-generator
that referenced
this issue
Nov 24, 2024
4 tasks
CaptainAye
added a commit
to CaptainAye/openapi-generator
that referenced
this issue
Nov 24, 2024
…ased on the selected style (OpenAPITools#20127)
CaptainAye
added a commit
to CaptainAye/openapi-generator
that referenced
this issue
Nov 24, 2024
CaptainAye
added a commit
to CaptainAye/openapi-generator
that referenced
this issue
Nov 24, 2024
…ased on the selected style (OpenAPITools#20127)
CaptainAye
added a commit
to CaptainAye/openapi-generator
that referenced
this issue
Nov 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report Checklist
Description
Wrapping query params in a containing object so that the generated client method only has one param instead of X params, but when the query param is an array, the generated code always builds a CSV with the contents of the array, instead of handling it as "multi".
openapi-generator version
It's not a regression. Wrapping object were supported after 7.2.0 thanks to this PR but it is not working correctly when having array properties.
OpenAPI declaration file content or url
modules/openapi-generator/src/test/resources/3_0/java/explode-query-parameter.yaml
Generation Details
Java language, WebClient library, but also with RestTemplate.
Steps to reproduce
By adapting the upper mentioned file, execute the following test
JavaClientCodegenTest.shouldProperlyExplodeWebClientQueryParameters
adding
Expected would be to handle the array query param as "multi" since explode defaults to true.
Actual: it's treated as csv because the collectionFormat param is null.
Related issues/PRs
#17441
Suggest a fix
The text was updated successfully, but these errors were encountered: