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

Is there an reason to config.swagger.decompose defaults to false? #943

Closed
hikinine opened this issue Jul 5, 2024 · 3 comments
Closed

Is there an reason to config.swagger.decompose defaults to false? #943

hikinine opened this issue Jul 5, 2024 · 3 comments
Assignees
Labels
good first issue Good for newcomers question Further information is requested

Comments

@hikinine
Copy link

hikinine commented Jul 5, 2024

Greetings, amazingg library.
I am using combined with Orval which takes que generated openapi json and convert into react-query

Anyway, i was supposed to drop the library because the only way i found (before hear about decompose option) to "properly" use @TypedQuery was replacing via script the generated openapi.json.

Diving on docs, i was not able to find any reference to "decompose".
luck for me, i was looking old issues and found #612 which was exactly what I need.

OPTION 1 (default)

image

OPTION 2 (desired)

image

I am 100% sure that exists an usecase where people would prefer option 1. I just dont think it should be an default option. Am I wrong?

Thanks in advance

@samchon
Copy link
Owner

samchon commented Jul 5, 2024

I had configured it to false because the query parameter name can be duplicated with path parameter name.

If you have other insight, then tell me please. Changing the default value is not hard thing.

@samchon samchon self-assigned this Jul 5, 2024
@samchon samchon added good first issue Good for newcomers question Further information is requested labels Jul 5, 2024
@samchon
Copy link
Owner

samchon commented Jul 5, 2024

Also, I'll enhance the document at next week.

@hikinine
Copy link
Author

hikinine commented Jul 5, 2024

Duplicated param/query may be a valid concern.
I'm not in a position to evaluate whether defaulting to true is the best option, as I don't know the exact side effects.

Anyway, If no one has bothered with this yet...
Enhance and highlight it to docs may be enough.

Again, amazing lib

samchon added a commit that referenced this issue Jul 8, 2024
Close #943: `config.swagger.decompose` to be default `true`.
@samchon samchon closed this as completed in 8b91937 Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants