-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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][Go] Latest Go client generator incorrectly handles explode keyword for query parameters #14089
Comments
@phynes-sensiblecode thanks for reporting the issue. Here are PRs related to the Go client generator in v6.3.0 (latest master) I think it may be related to #13909 @phynes-sensiblecode can you please take a look to see if it's a regression? Thanks. |
@wing328 The issue is a regression that was introduced with the changes for #13909. The issue is present with commit
|
I tried out my test case with I can see that that query parameters are no longer exploded when they shouldn't be. However, the values associated with exploded parameters are still given as
|
I confirm this is still observed in version 6.6.0. |
Bug Report Checklist
Description
In v6.2.1 exploded and unexploded query parameter lists are handled correctly by the Go client generator. This is an example of a URL that has been created by an example client.
explode
is a query parameter withexplode=true
.noexplode
is a query parameter withexplode=false
:The same code generates this URL with the latest Docker image. The unexploded parameter list is exploded, whilst the exploded parameter list has
reflect.Value value
for each supplied value:openapi-generator version
Works as expected in
v6.2.1
. Bug observed withlatest
Docker image (uploaded to DockerHub on Nov 20, 2022 at 9:15 am).OpenAPI declaration file content or url
Generation Details
Generated client using Docker image:
Steps to reproduce
I used a
main.go
based on an auto-generated example inout/go/docs/DefaultApi.md
.configuration.Debug
is set totrue
to enable printing of URLs:I used the
replace
keyword in thego.mod
file to point to the autogenerated client library:Building and running
main.go
shows the malformed URL. The actual query fails due to using a dummy host.Rebuilding the client with
latest-release
version of Docker image results in correct URL:Related issues/PRs
Can't find any.
Suggest a fix
The text was updated successfully, but these errors were encountered: