Closed
Description
Hello,
I have the following grape endpoint:
params do
requires :user, type: Hash do
requires :access_start, type: Date, allow_blank: false
# ... more required attributes
end
require :filters, type: Array
end
When I send the following data: {"user":{"access_start": null},"filters":[{"id":{"equals":[1, 2]}}]}
and I inspect the error raised by grape(calling as_json on it), I sometimes get errors like this:
[{:params=>["user[access_start]"], :messages=>["is empty"]}]
and sometimes like this:
[{:params=>["user[0][access_start]"], :messages=>["is empty"]}]
I am not able to get a consistent behaviour, but the first way seems correct to me. Using grape 0.16.2
Thanks!