Closed dob9601 closed 1 month ago
Can you post your exact fix? missing question mark where?
Replacing:
${baseURL}${url}
With:
${baseURL}${url}?
Solved the issue since URLSearchParams doesn't generate a leading question mark when stringified.
Note that this isn't necessarily the ideal solution since requests without query parameters will end up with a trailing question mark - ideally there should be a check beforehand to ensure there are query parameters.
Happy to create a PR if that would be easiest :)
please do! I will merge it
Assigned it to you.
Ran into an issue whereby my requests were missing a
?
for any requests containing query parameters. I traced the issue back to this chunk of code I copied from the documentation, which is missing a question mark when constructing the URL. This issue is potentially responsible for: https://github.com/orval-labs/orval/issues/482https://github.com/orval-labs/orval/blob/87e1db632b0b6678691b3796d162bed13879b065/docs/src/pages/guides/custom-client.md?plain=1#L40
What versions are you using?
Checked on master Please execute
npx envinfo --system --npmPackages orval,zod,axios,msw,swr,@tanstack/react-query,@tanstack/vue-query,react,vue
and paste the results here.