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
Make a REST API endpoint which takes a list of ids and declare it with collectionFormat(multi)
e.g. // @Param ids query []string false "ids to query for objects" collectionFormat(multi)
Generate API client with swagger-codegen for golang
Send a request to API with generated API client code and find on server side that ids are concatenated without separators
Description
Query array declared with
collectionFormat(multi)
is not generated correctly, withids
concatenated without separator.Swagger-codegen version
main
branchSwagger declaration file content or url
Command line used for generation
swag init
Steps to reproduce
collectionFormat(multi)
e.g.
// @Param ids query []string false "ids to query for objects" collectionFormat(multi)
swagger-codegen
forgolang
Related issues/PRs
Not related, but probably in similar area.
#10963
Suggest a fix/enhancement
Add handling for
collectionFormat
multi
to the following function:https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/go/client.mustache#L129
Similar to
python
https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/python/api_client.mustache#L423
The text was updated successfully, but these errors were encountered: