Skip to content
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

Generated client incorrectly encodes arrays in query string #676

Closed
tve opened this issue Aug 2, 2016 · 2 comments
Closed

Generated client incorrectly encodes arrays in query string #676

tve opened this issue Aug 2, 2016 · 2 comments
Labels

Comments

@tve
Copy link

tve commented Aug 2, 2016

The generated client produces an array encoding for the query string using ',' instead of a repetition of the param. E.g., ids=1,2,3 instead of ids=1&ids=2&ids=3.

Also, the test whether a query string param is necessary should use if len(array) > 0 instead of if array != nil.

@raphael raphael added the bug label Aug 2, 2016
@tve
Copy link
Author

tve commented Aug 2, 2016

Looks like the test may not matter as much, I think you need to produce:

if len(databags) > 0 {
  for _, e := range databags {
    values.Add("databags", e)
  }
}

@raphael
Copy link
Member

raphael commented Aug 4, 2016

This should be fixed, thank you!

@raphael raphael closed this as completed Aug 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants