Closed nblumoe closed 5 years ago
It's not possible to pass all the options down to the handler of specific formats to override for example decoder or predicate. This is because they are contained in a nested :options hash-map being created here: https://github.com/ngrunwald/ring-middleware-format/blob/3fd37b99ffd0dc5202d0c92d0cdae0ce0c647766/src/ring/middleware/format_params.clj#L278 this does not override the top-level options via destructuring over here: https://github.com/ngrunwald/ring-middleware-format/blob/3fd37b99ffd0dc5202d0c92d0cdae0ce0c647766/src/ring/middleware/format_params.clj#L230
decoder
predicate
:options
Thus, the calls like (or predicate transit-json-request?) will always end up with the second expression and cannot be overriden.
(or predicate transit-json-request?)
It's not possible to pass all the options down to the handler of specific formats to override for example
decoder
orpredicate
. This is because they are contained in a nested:options
hash-map being created here: https://github.com/ngrunwald/ring-middleware-format/blob/3fd37b99ffd0dc5202d0c92d0cdae0ce0c647766/src/ring/middleware/format_params.clj#L278 this does not override the top-level options via destructuring over here: https://github.com/ngrunwald/ring-middleware-format/blob/3fd37b99ffd0dc5202d0c92d0cdae0ce0c647766/src/ring/middleware/format_params.clj#L230Thus, the calls like
(or predicate transit-json-request?)
will always end up with the second expression and cannot be overriden.