Closed jfpimentel closed 2 years ago
Hello @anttiviljami, the array param is currently blocking the library update on our side. We find it really weird to expect the param to be an array and then because there is only element the param might becoming a string or a number.
Would you be ok to revert it, or did you make this change on purpose ? We can, of course, suggest a PR to fix the issue if you don't have the time to look at it :)
We located the problem on this line : https://github.com/anttiviljami/openapi-client-axios/blob/master/packages/openapi-client-axios/src/client.ts#L482
Please let us know your thoughts on this topic, Thank you again for this great library, Have a good day :)
Hi @gterral @jfpimentel indeed this is not a good behaviour.
Can we find a way to fix this but still retain the use of the native URLSearchParameters
? The intent was to get rid of unnecessary 3rd party dependencies for query param handling
@anttiviljami Thank you for getting back to us 🙂
I opened this PR to fix the issue: https://github.com/anttiviljami/openapi-client-axios/pull/112
The fix released as part of openapi-client-axios@5.2.0
. 🙏
Thanks @jfpimentel !
Great! Thank you @anttiviljami 😉
Hey @anttiviljami,
After updating to version 5.1.0, I noticed that an array param with a single element is NOT passed as an array anymore.
This means that an array param may be passed as
ids: [1,2]
orids: 1
.Is this really okay or is it a bug?
Thanks! Joao