The parameter alias as option is ignored when a parameter is declared inside a given block
params do
optional :label, as: :vertex_label, type: String
given :label do
optional :property, as: :vertex_property, type: String
end
end
When a route with this params declaration is triggered, declared(params) evaluates to:
{ "vertex_label" => "MyLabel", "property" => "MyProperty" }
I expect the property parameter to be aliased to vertex_property in declared params, but this does not happen
Looks legit, try writing a spec for it?
Added fix to the PR
Closing via https://github.com/ruby-grape/grape/pull/1771. Thanks @jereynolds!
Do you know what the expected time until the fix is released is?
Nope, but there're a bunch of changes so I'll do a release when I get to it or another maintainer beats me to it, https://github.com/ruby-grape/grape/issues/1773.