reitit 2025-04-13

Reitit malli coercion uses Lite syntax. Is there a way specify that I want a closed map schema, i.e. if there are extra query parameters I want 400 response?

by default, the malli coercion strips extra keys from params, so you need to also set :strip-extra-keys false in the options to reitit.coercion.malli/create

I was more going for “throw user an error when they typo on a parameter name” behaviour

yes, you should get that by using :closed map schemas and :strip-extra-keys false

ah actually, malli closes the map schemas by default, so it should be enough to use :strip-extra-keys false

or rather, reitit malli coercion closes map schemas by default

note: extra query params are always accepted

Was trying it out with query params in particular