@ikitommi would you consider allowing humanized
as the key that is output when there are errors, to be changed to a user-defined one (defaulting to humanized
if the opts map entry is missing?)
sure, there is now a option :encode-error
that can have a fn of type error -> error
, called last to optionally fully rewrite the error.
{:encode-error (fn [error] {:errors (:humanized error)})}
==>
{:status 400, :body {:errors {:x ["missing required key"]}}}'
shipped in [metosin/reitit "0.5.6"]
.
fantastico!