Closed stepcut closed 2 years ago
Hey @stepcut, thank you for noticing, you are absolutely right!
I noticed while investigating that there are other flaws as well with the current implementation and I fixed them as well as added tests to make sure it should work in the future too in this commit. I will create a PR for it shortly and after merging close this issue if this is fine with you.
Thanks! Sounds good to me.
I am pretty sure the polarity for
queryParamExplode
is inverted. This patch should fix it:https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator/commit/534b45874b6035779dda47af6e0081baacd7842c
If I understand the code correctly, it would seem that
jsonToFormDataFlat
generates the query parameters in the exploded form. SoqueryParamExplode
should do nothing (aka,id
) if the parameters are supposed to be exploded. And it needs to consolidate them if they are not supposed to be exploded.I had issues calling the mailchimp marketing api until I fixed this polarity in the generated code. When I printed out the request, the query parameters were exploded when the should not have been.