I use something like this
(def collection-transformer
(mt/transformer
{:decoders
{:vector (fn [x]
(if (vector? x) x [x]))
:sequential (fn [x]
(if (sequential? x) x [x]))
:set (fn [x]
(if (set? x) x #{x}))}}))and then if the schema is a collection but a parameter is not, it will be wrapped in the relevant collection
and include that as one of the transformers passed to the coercer
then ths spec is just
[:year {:optional true}
[:vector int?]]Is there any way to use reitit format middleware muuntaja backed by cheshire?
Yes, muuntaja has cheshire module so you'd just need to configure the middleware to refer to cheshire json format instead of the regular Jsonista json format