We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
kubb
3.3.4
None
kubb.config.ts
pluginClient({ .. client: 'fetch', operations: true, paramsType: "inline", pathParamsType: "inline", dataReturnType: 'full' }),
No response
@tanstack-query
MSW
React
Vue
React 19
/api/user/test?allFields=true
?
Every time
Query params should not be ignored
Looking at Kubb's fetch.js code, the query parameters are not processed:
// src/clients/fetch.ts var fetchClient = async (config) => { const response = await fetch([config.baseURL, config.url].filter(Boolean).join(""), { method: config.method.toUpperCase(), body: JSON.stringify(config.data), signal: config.signal, headers: config.headers }); const data = await response.json(); return { data, status: response.status, statusText: response.statusText }; };
For example, if you look at the code generated by orval, the query parameters are appended to the URL (which is not the case with kubb):
export const getGetUserByUsernameUrl = (username: string, params?: GetUserByUsernameParams,) => { const normalizedParams = new URLSearchParams(); Object.entries(params || {}).forEach(([key, value]) => { if (value !== undefined) { normalizedParams.append(key, value === null ? 'null' : value.toString()) } }); return normalizedParams.size ? `/api/user/${username}?${normalizedParams.toString()}` : `/api/user/${username}` }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What version of
kubb
is running?3.3.4
What kind of platform do you use?
None
How does your
kubb.config.ts
config look likeSwagger/OpenAPI file?
No response
What version of external packages are you using(
@tanstack-query
,MSW
,React
,Vue
, ...)React 19
What steps can reproduce the bug?
/api/user/test?allFields=true
(where test is the username)?
) are ignoredHow often does this bug happen?
Every time
What is the expected behavior?
Query params should not be ignored
Additional information
Looking at Kubb's fetch.js code, the query parameters are not processed:
For example, if you look at the code generated by orval, the query parameters are appended to the URL (which is not the case with kubb):
The text was updated successfully, but these errors were encountered: