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

Support non exploded arrays in query parameters #951

Open
zoriya opened this issue Dec 19, 2024 · 0 comments
Open

Support non exploded arrays in query parameters #951

zoriya opened this issue Dec 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@zoriya
Copy link
Contributor

zoriya commented Dec 19, 2024

What is the problem this feature would solve?

I'd like to support arrays in the form sort=slug,id instead of sort=slug&sort=id. This is documented under swagger as the explode: false option of arrays (doc can be found here.)

After elysiajs/elysia-swagger#179 get merged, the explode parameter could be defined for swagger, but parsing won't work.

What is the feature you are proposing to solve the problem?

Either supporting specially the explode parameter or best support this syntax in all cases (or just close this issue and consider it a user-land feature ig.)

What alternatives have you considered?

Use a custom parser type with a t.Transform to manually convert a string to an array.

@zoriya zoriya added the enhancement New feature or request label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant