Closed mlankenau closed 5 years ago
We have to build an endpoint (format defined by third party) that receives an array at the root of the json message.
[ {"foo": "bar"}, {"foo": "bar"} ]
I don't see how to define this parameter in Maru. As a workaround I take the json directly from conn.params._json which is not so nice.
this is designed by plug https://hexdocs.pm/plug/Plug.Parsers.JSON.html , for now I think you have to use
params do requires :_json, type: List[xxx] end
Thx, will try that...
We have to build an endpoint (format defined by third party) that receives an array at the root of the json message.
[ {"foo": "bar"}, {"foo": "bar"} ]
I don't see how to define this parameter in Maru. As a workaround I take the json directly from conn.params._json which is not so nice.