-
-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
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
Query parameters with dots to camelCase #460
Comments
@angela-patino-yuli can you share part of your schema with this query params? |
Hi. Thanks for the quick response, and sorry for my delay.
|
@angela-patino-yuli I think this can broke server side logic for other users, need more research to find a better way to do that. |
thanks. if you need anything. let me know 😺 |
@js2me hey, and what if I would like to keep dots? is there a way to disable it? |
@adrivelasco I dunno did you find a solution or not, but you can use version 12.x.x to queries with dots. |
@js2me it does indeed break server-side logic in my case at least. The server expects dots in the parameter name. In my case we have these parameters :
And the generated schema is export interface Params {
artistId?: number[];
id?: number;
"id[]"?: number[];
} instead of export interface Params {
"artist.id"?: number;
"artist.id[]"?: number[];
id?: number;
"id[]"?: number[];
} |
Hi there! 12.0.4 fix my problem with dots. v13 has this bug. |
Hello, we are facing same issue. This change introduced in version 13 no longer allow us to use this library. Could you implement an option to disable this auto conversion to camelCase? Waiting for a fix we will stick with version 12.0.4. Thanks |
+1 to everyone who says this change breaks logic. |
Could it be possible to fix this issue, please? |
@nicky1038 thanks for the fix |
A temporary workaround for #701 is to apply it as a patch using patch-package. But you need do the following steps:
|
I created a temporary npm package with patched version 13.0.23: https://www.npmjs.com/package/@ezze/swagger-typescript-api You can use it until the issue is fixed. |
Summary
A similar issue has been fixed for path parameters #413
Is it possible to have it for query params as well?
On my swagger.json file, If a query parameter has a dot in it (e.g. from.year) then swagger-typescript-api rewrites this to
"from.year"?: number;
instead of"fromYear"
Expected
Actual
The text was updated successfully, but these errors were encountered: