metosin / reitit

A fast data-driven routing library for Clojure/Script

Home Page:https://cljdoc.org/d/metosin/reitit/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`reitit.coercion/request-coercer` converts records created by a multipart data store into maps

p-himik opened this issue · comments

The Reitit multipart middleware uses the coercer in such a way so that it keywordizes all the keys in the data, even if that data is a record.

I'm using a store that returns a record instead of a plain map because it makes certain aspects simpler, including validation (a plain instance? instead of a custom spec). The current implementation of the multipart middleware along with the request-coercer function forces me to go back to a plain map with a custom spec.