Skip to content
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

fix: revert e340527 - removed forced renaming query params to camelCase #701

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nicky1038
Copy link

@nicky1038 nicky1038 commented Apr 19, 2024

There was a change introduced in the 13.0.0 major release. Since that release all query parameter names are being renamed into camelCase. It is a way wrong behavior.

Why is it wrong? Say, a backend server expects a query parameter called a.b. In the Swagger schema provided by that server, that query parameter is also called a.b. When swagger-typescript-api generates types, it renames the query parameter to aB but does not provide any runtime transform. When user passes aB query parameter, the server obviously cannot recognize it, as it expects a.b.

I cannot understand what task is being solved with that change. Renaming query parameters is not valid at all and breaks logic.

It was suggested in #460. After it was released, numerous users also compained that their clients are generated wrongly.

My PR reverts that change.

@smorimoto
Copy link
Collaborator

Could you rebase to latest main branch?

@nicky1038 nicky1038 force-pushed the prevent-camelcase-query-params branch from 6a3c159 to ed4a65a Compare June 19, 2024 22:29
@nicky1038 nicky1038 force-pushed the prevent-camelcase-query-params branch from ed4a65a to 61ddfcc Compare June 19, 2024 22:41
@nicky1038
Copy link
Author

@smorimoto Hi! Rebase done. Thank you so much for taking over maintenance of this project!

@smorimoto smorimoto requested a review from js2me June 27, 2024 22:56
@smorimoto smorimoto added the bug Something isn't working label Jun 27, 2024
@thefuga
Copy link

thefuga commented Sep 5, 2024

Is anything keeping this from being released? @smorimoto

@george-oakling
Copy link

Hello, this is a blocker for us to upgrade to v13 version.

@smorimoto smorimoto requested a review from Copilot November 20, 2024 00:38

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 4 changed files in this pull request and generated no suggestions.

Files not reviewed (3)
  • tests/spec/dot-path-params/snapshots/basic.test.ts.snap: Language not supported
  • tests/spec/sortTypes-false/snapshots/basic.test.ts.snap: Language not supported
  • tests/spec/sortTypes/snapshots/basic.test.ts.snap: Language not supported
@harutlc
Copy link

harutlc commented Nov 30, 2024

this is blocker for me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants