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
New Oazapfts version broke generated code: Need support for endpoint parameter of type Array #319
Comments
Hey @carleryd, sorry to hear that! What was the last version that worked for you? (#103 was released along with v4.0.0, so probably v3.6.0 right?)
Actually, according to mdn, it accepts "A string, number, boolean, null, undefined, or any object.". Can you give a little more context about the error? Is it a typescript issue, where your code does not compile? Or does the API you're connecting with expect the parameters to not be url-encoded? |
Hi @Xiphe , thanks for getting back to me so quickly!
Yes I went back to
Oh yes you're right! I just notice the generated code had TypeScript errors, but looking into it more now I realise we don't even use these generated endpoints. We only use the types generated by In conclusion it seems like all would be fine for us if TypeScript added support for array to For the moment we don't need to upgrade, especially because the RTK Query codegen library is using a fork of 3.6.0 it seems, so we would want to use the same version as them. Thanks again for your help! |
OK, cool. I'm gonna open an issue at TypeScript for this. Please let me know when this turns out to become a blocker. |
Seems as if there already was a typescript discussion about this: microsoft/TypeScript#18159 And I currently don't want to questions decisions there. Will provide a fix for this on our end soon |
While trying to fix this I realized that it want to spend a little more time to ensure we're spec compliant for all permutations of parameter serialization wether it's in query, path, cookie and header parameters. I've pre-released my current fix as |
Update: I have not made any progress here but it's still on my list |
Just realized that it's exactly one year later and I haven't made progress with this and I'm afraid I wont find time for this in the forseeable future :( |
First off, thanks a lot for building this library! It's helped us tremendously and I really appreciate your work.
I ran into an issue with existing Open API schema code when updating to latest 4.2 version.
My schema endpoint code looks like this
which when running
oazapfts
generatesbut
encodeURIComponent
does not accept array as argument. This broke after the introduction of #103. Before this change, the generated code looked the same except here were noencodeURIComponent
applied toorderIds
.In the meantime I'm going back to an earlier version. Please let me know what you think, thanks!
The text was updated successfully, but these errors were encountered: