Open freemanoid opened 11 years ago
Is there any workaround, which would allow tuning this ordering? Most preferable solution would be to able to explicitly set before_filter which will trigger apipie validations, then it would be possible to tune ordering. This would allow strict validations, which must be done before anything else to be done properly before apipie, and those which depend from validated params to be done after.
We have a TODO on turning the validation into a filter (right now, it'd done by metaprograming, which I agree is not the best way of dealing with this), After that's done, it should be possible to tweak the ordering by explicitly caling before_filter :apipie_validations
in the context of the controller
Probably not simple workaround right now :/
Apipie
params validators executes after railsbefore_filter
so if we want to use some params inbefore_filter
we should validate it manually.