nestia icon indicating copy to clipboard operation
nestia copied to clipboard

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

Open hikinine opened this issue 1 year ago • 3 comments

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 https://github.com/samchon/nestia/issues/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

hikinine avatar Jul 05 '24 02:07 hikinine

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 avatar Jul 05 '24 03:07 samchon

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

samchon avatar Jul 05 '24 03:07 samchon

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

hikinine avatar Jul 05 '24 03:07 hikinine