-
-
Notifications
You must be signed in to change notification settings - Fork 268
Open
Labels
bug 🔥Something isn't workingSomething isn't workingfeature 🚀New feature or requestNew feature or request
Description
Description
I'm using this on my config file:
export default defineConfig({
output: {
path: 'src/lib/api',
case: 'camelCase',
format: 'prettier'
},
...
});
I'm getting all functions, models as camelCase, that's perfect...
But on the defaultPathSerializer function, it looks for snake_case keys which is how it is written on the urlPath.
Is there a way to learn how is the output.case configured and convert the match key here also ?
Or can we have a custom pathSerializer like we have for query and body ?
Or is there any other point I missed ?
Reproducible example or configuration
So in my case here is the request function:
export const getCategories = <ThrowOnError extends boolean = true>(
options: Options<GetCategoriesData, ThrowOnError>
) => {
return (options.client ?? client).get<GetCategoriesResponses, unknown, ThrowOnError>({
url: '/stores/{store_id}/categories',
...options
});
};
export type GetCategoriesData = {
body?: never;
path: {
/**
* Store id
*/
storeId: unknown;
};
query?: never;
url: '/stores/{store_id}/categories';
};
I have the path param as storeId but since the url has store_id it doesn't find the path param in the defaultPathSerializer function
OpenAPI specification (optional)
No response
System information (optional)
No response
Metadata
Metadata
Assignees
Labels
bug 🔥Something isn't workingSomething isn't workingfeature 🚀New feature or requestNew feature or request