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
If I have a snake_case path param in original schema like
/some/{path_param}/: ... parameters: - name: path_param in: path required: true type: string
then it'll be converted into camelCase in generated route (using generateRouteTypes: true):
generateRouteTypes: true
'/some/{path_param}/': { get: { params: { pathParam: number; }; ... }; }
I guess I found this place and I see that this behavior is hard-coded:
swagger-typescript-api/src/schema-routes/schema-routes.js
Line 252 in 2b6db23
The problem is that in our project we don't want path params to be converted into camelCase. We expecting that they are stay as given by schema.
Would be nice to have an option for generateApi for disabling this converting. Something like
generateApi
return generateApi({ generateRouteTypes: true, pathParamsInCamelCase: false, // true by default for example });
The text was updated successfully, but these errors were encountered:
We also want this functionality. It would be great to use function for that, like with hooks
Sorry, something went wrong.
Same here. Sad this behavior is by default. That makes the library unusable for us.
This issue was introduced by a change created to solve this issue #460
No branches or pull requests
If I have a snake_case path param in original schema like
then it'll be converted into camelCase in generated route (using
generateRouteTypes: true
):I guess I found this place and I see that this behavior is hard-coded:
swagger-typescript-api/src/schema-routes/schema-routes.js
Line 252 in 2b6db23
The problem is that in our project we don't want path params to be converted into camelCase. We expecting that they are stay as given by schema.
Would be nice to have an option for
generateApi
for disabling this converting. Something likeThe text was updated successfully, but these errors were encountered: