You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Given a endpoint with a deep query object and at least one other parameter, it is possible to create an invalid query string, where multiple "&" are generated without parameters and values in between.
to avoid such cases by not adding empty strings to the string builder.
Steps to reproduce
Generate the clients for the above openapi.yaml: java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i openapi.yaml -g java --library native -o out
Related issues/PRs
I couldn't find similar issure, but it seems to have been introduced with d269a2a
Suggest a fix
Don't add the result of {{paramName}}.toUrlQueryString("{{baseName}}") to localVarQueryStringJoiner if it is an empty string (modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache:371)
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
Given a endpoint with a deep query object and at least one other parameter, it is possible to create an invalid query string, where multiple "&" are generated without parameters and values in between.
openapi-generator version
7.6.0, introduced in 6.3.0
OpenAPI declaration file content or url
Generation Details
This produces
which may add empty strings to the localVarQueryStringJoiner.
This would be the case for example with
producing
/test?&bar=foo
Instead I would expect something like
to avoid such cases by not adding empty strings to the string builder.
Steps to reproduce
Generate the clients for the above openapi.yaml:
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i openapi.yaml -g java --library native -o out
Related issues/PRs
I couldn't find similar issure, but it seems to have been introduced with d269a2a
Suggest a fix
Don't add the result of
{{paramName}}.toUrlQueryString("{{baseName}}")
to localVarQueryStringJoiner if it is an empty string (modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache:371)The text was updated successfully, but these errors were encountered: