I'm defining params for a grape route like this
params do
requires :array, type: Array do
requires :foo, type: String
requires :bar, type: String
end
end
The data for this endpoint would be {"array": [{"foo": "123", "bar": "456"}]}
.
How can I get rid of the additional
"array"
? The data should look like this[{"foo": "123", "bar": "456"}]
I can't define a type Array
on params
.