-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Group param with a required param defaults to Array #722
Comments
Hello, seems like you should provide group :a, type: Hash do
requires :b
end from readme: BTW, I'd like |
Lets not change the default, but I would be open to raising an error when the type is not provided in this case. |
I'm going to give it a shot to make it raise an error if no type is specified. I'll issue a PR when done and we'll see what comes out of it. |
Make the type in group of required params required (#722)
The solution was implemented in the attached PR. |
I'm trying to use a required param inside of a group, like this:
As an aside, my actual use case looks more like:
But if I send a request that should satisfy that first example, like one of these:
I get a response saying
a
is invalid:I made an example here that reproduces the bug. I'm using grape version 0.8.0.
The text was updated successfully, but these errors were encountered: