-
Notifications
You must be signed in to change notification settings - Fork 13
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
Array query params #34
Comments
Here is a more recent proposal to add support to the Blueprint format. Swagger on the other hand supports array params. We should define a syntax for defining them in BlueBird and figure out a workaround for the apib output. |
Yeah, I think I saw that proposal when I was digging into it but seems like that one's pretty dead on the vine. I agree, feels like step one is just to make this work well with Swagger output and then work backward to a reasonable apib solution if/until the proposal makes it in. |
@mmcc Could you post an example of how you've ended up going using a string for the name? Thanks! |
@gonzag88 I think he just did something like this:
|
I'm going to preface this by saying I don't think this is supported by API Blueprint right now, but I figured it could be useful as work continues on Swagger support.
Currently, the support for array params is pretty broken. Our query params that are arrays follow the standard Phoenix syntax,
foo[]=1&foo[]=21
. As far as I can tell, there's currently no way to describe this in theapi
macro (but again, I think that's a problem all the way down to API Blueprint).We've ended up going with just using a string for the name and setting it to
param[]
so it at least shows up correctly in the URI Parameter list, but unfortunately, this means that the params won't get picked up by theConnLogger
. Not a huge deal on our end, I think this solution gets us close enough, but it'd be cool to find a solution for this long term.The text was updated successfully, but these errors were encountered: