-
-
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
nested params are not found in route hash #280
Comments
Looks like it's a real problem. Could you please build a quick repro / failing Grape test please? |
Yes, I'll try to build a failing test soon... |
I've added a failing test here marcusg@ecaa3f8. Is there a chance to implement this behaviour? Maybe i'm missing something important here, but there needs to be a way to access all required/optional nested parameters. |
Now that you have a failing test, try to fix this and make a PR - definitely the quickest way to get this fixed! |
Fixed. It would be non-trivial to preserve the nested group structure, so I chose to simply correct the problem and keep the flat list where the keys are the unique parameter names. By that I mean that your example produces this:
|
@dblock that looks really nice, thank you! |
Is this issue fixed? I recently attempted this with the following definition: module API
end I am unable to get my rspec test to pass because I find empty params:
TIA, Mike |
The issue at hand here should be fixed. Can you reopen something new with a repro inside Grape if you don't see the expected behavior? |
it seems like the nested parameter names overwrite same parameter-names in different namespaces.
when i declare my parameter validation like this:
the resulting route parameters look like:
so no "target"-stuff can be found here and i think it's an issue. any ideas?
The text was updated successfully, but these errors were encountered: