Fork me on GitHub

Moro again: is there a way to add custom matchers for Reitit Schema coercion like there is for ring swagger: ? I found the current coercions in, but could not figure out a clean way to add more. More specifically, we’d like to corce date strings to OffsetDateTime instances.


Yeah. We are using Prismatic schema. So is the idea to override the default-coercion-matcher with an own implementation?


Yeah. IIRC it's a map of type => coercion fn, so you'd probably merge your coercers to the existing


so you could merge your own impl by using some-fn with existing matcher and your own


Ok. In my case we’d need the matcher for json requests, so I guess I’d need to build on that json-coercion-matcher and add my own implementation on top of that with some-fn? I’ll try that approach. Thanks!


So I'm using Reitit and Ring, and I have an endpoint where I need to close a resource when the response has been fully sent (I'm returning an input-stream that's being read from a database, and I need to close the associated transaction). How can I do this?