-
Notifications
You must be signed in to change notification settings - Fork 3
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
Allow passing arrays to query string params #2
Comments
I think we should go even further and try to support other types like
Under the hood we are using query-string. It already supports variety of options and I think it might be good idea to just directly pass those in
That's a good question. I think if we'd support |
Could be the case with some corporate, legacy API gateways which call different APIs with different standards. Yeah, they should be consistent when it comes to the encoding, but we all know that is not always the case :D But I agree that we shouldn't focus on such a niche case for now, separate routings can always serve as a workaround. |
Currently there is no easy way of defining and creating paths with array query params. As there is no recognized standard for encoding arrays in query strings, we should probably have a highly customizable API with built-in support for the most common conventions:
?array=item1&array=item2
?array[]=item1&array[]=item2
?array=item1,item2
API design considerations:
string | string[]
or provide a new configuration option on a per-param level which specifying whether the param is supposed to be an array or a scalar (so that the type is then narrowed accordingly)?createRouting
where a config would be passed (with properties likeencodeQueryParam
orqueryParamArrayEncodingStrategy
). To make it even more elastic, we could also allow overriding those options for single params.The text was updated successfully, but these errors were encountered: