reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
bartuka 2021-04-19T14:01:50.114500Z

when you create the coercion using reitit.coercion.malli/create there is a :error-keys options that defaults to :error-keys #{:type :coercion :in :schema :value :errors :humanized #_:transformed} I haven't tested, but I believe if you leave only :humanized here it should work

bartuka 2021-04-19T14:03:15.116100Z

Hi all, I was doing validation of my reitit route data and noticed that reitit has support only for spec at https://github.com/metosin/reitit/blob/master/modules/reitit-core/src/reitit/spec.cljc, would be interesting to add support to malli schemas? If so, what approach? I thought about creating a malli.cljc file and replicate the behavior of spec.cljc

Ben Sless 2021-04-19T14:15:08.116700Z

thank you! I'll check it out

1👍
ikitommi 2021-04-19T14:26:41.119400Z

@iagwanderson darn the slack history, someone just asked the same - there definitely should be support for malli. either a) replace the (buggy) spec validation with malli or b) allow one to pick either one. I would start with b, not sure how rude it would be to evolve eventually to a.

ikitommi 2021-04-19T14:27:03.119900Z

if you have extra time, PR for b most welcome.

bartuka 2021-04-19T14:28:18.121200Z

my idea to create a new namespace was to allow either one to be used

1👍
ikitommi 2021-04-19T14:28:31.121400Z

also, malli pretty printer would be needed, so much on the open source backlog, so little time (have a draft of that already)

ikitommi 2021-04-19T14:28:39.121500Z

https://github.com/metosin/malli/issues/19

ikitommi 2021-04-19T14:29:23.121800Z

almost 2 years ago 😮

bartuka 2021-04-19T14:30:19.122Z

heha, time fly. I will take a look into it wednesday

1👍
bartuka 2021-04-19T19:00:12.122300Z

@ikitommi I checked the virhe repo and there is no code in there, this picture is from a local code you were experimenting with?