openapi-codegen
openapi-codegen copied to clipboard
Add `camelizedQueryParams` option
The idea will be to camelized every queryParams in the generated components/fetchers to improve the DX.
To have this working, we also need to generate a bit of extra logic in the fetcher if camel(name) !== name
export const fetchGetBaseBranchStats = (variables: GetBaseBranchStatsVariables) =>
xatabaseFetch<GetBaseBranchStatsResponse, undefined, {}, GetBaseBranchStatsQueryParams, GetBaseBranchStatsPathParams>(
{ url: '/db/{basebranchName}/stats', method: 'get', ...variables, queryParams: {/* map to original names */} }
);
@fabien0102 do you still want this? IMO queryParams or any other params should match with OpenAPI spec to be consistent.