We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
version 1.3.2
API definition
params do requires :id, type: Integer optional :hash, type: Hash do requires :name, type: String end requires :arr_parent, type: Hash do requires :id, type: Integer optional :arr, type: Array do requires :k, type: String requires :v, type: String end end end end put '/results' do declared_params = declared(params) end
Request body:
{ "id": 1, "arr_parent": { "id": 1 } }
real declared_params:
{ "id": 1, "hash": { "name": nil }, "arr_parent": { "id": 1, "arr": { "k": nil, "v": nil } } }
expected declared_params:
{ "id": 1, "hash": {} or nil "arr_parent": { "id": 1, "arr": [] } }
is this bugs? or specification?
declared_param_is_array? method in lib/grape/dsl/inside_route.rb doesn't seem to work correctly for nested array.
maybe relate #1847
The text was updated successfully, but these errors were encountered:
I want to say it's a bug. Try PRing this as a spec + fix?
Sorry, something went wrong.
Modify declare for nested array and hash ruby-grape#2042
692f639
37e9a5c
c55af12
8cbec94
00162f5
3551c67
No branches or pull requests
version 1.3.2
API definition
Request body:
real declared_params:
expected declared_params:
is this bugs? or specification?
declared_param_is_array? method in lib/grape/dsl/inside_route.rb doesn't seem to work correctly for nested array.
maybe relate #1847
The text was updated successfully, but these errors were encountered: