reitit

mafcocinco 2024-11-06T16:25:25.371439Z

I’m building a greenfield HTTP service and I want to use reitit with malli . I have seen pieces of how to set this up for request and response validation (with error handling) but have struggled to get things working. Does anyone have a reference or link to a complete, stand-alone HTTP service example that uses reitit for routing and malli for request and response schema validation (which I assume will include type coercion? I was unclear of coercion and validation can work independently or are inherently tied together).

Linus Ericsson 2024-11-07T10:18:25.008499Z

https://github.com/dharrigan/startrek (personally I think this way of structuring code is somewhat scattered and hard to follow, but it this repo has a lot of functionality and is clearly documented)

2024-11-26T20:51:53.942129Z

I know I'm a bit late to this thread but I released Zodiac which I think is a pretty clean example of using reitit: https://github.com/brettatoms/zodiac

Ben Sless 2024-11-06T16:39:53.130589Z

Something like this? https://github.com/metosin/reitit/blob/master/examples/openapi/src/example/server.clj

mafcocinco 2024-11-06T16:48:38.827859Z

Yes, thank you! I’m not sure how I missed that. I thought I had gone through all the examples on the reitit site. Sorry for that!

sattvik 2024-11-06T16:58:26.035669Z

I also like clj-kit for setting up a new project.