-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
A param of type Hash is converted to Array in declared(params) #1239
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
Comments
Looks like a definite bug, I would expect |
That could be an expectation, yes. Personally I like having it still be there and showing the values of the nested parameters because of the way I use / think about them as groups. But in either case, I don't think an Array is an expected value |
I believe that this is due to this specific line: https://github.com/ruby-grape/grape/blob/master/lib/grape/dsl/inside_route.rb#L48 |
Is this an intended behavior, as set forth by this spec in |
I think that spec ignores the fact that there's an explicit |
Spec describing the issue
This produces the following output
Setting a default on the param is a workaround
This spec passes without error with the expected output
Using Grape v0.14.0, running specs on master
The text was updated successfully, but these errors were encountered: