reitit

opqdonut 2025-05-27T06:59:28.671189Z

Heads up: I think 0.9.0 breaks for many users. Coercion will throw a null pointer exception if it encounters a response code that's not listed under :responses. That's not intentional. I hope verify this and to have a fix out real soon. EDIT: version number

🫡 3
valerauko 2025-05-27T07:57:46.860919Z

is there an issue for this? (for linkback purposes)

opqdonut 2025-05-27T08:26:05.058229Z

not yet...

opqdonut 2025-05-27T09:06:15.042329Z

issue confirmed: https://github.com/metosin/reitit/issues/742

👍 1
👍🏻 1
opqdonut 2025-05-27T09:11:06.485809Z

luckily the fix is a oneliner https://github.com/metosin/reitit/pull/743

🎉 1
juhoteperi 2025-05-27T11:14:08.572589Z

Release 0.9.1 is out

🙌 3
nnecklace 2025-05-27T09:22:31.258889Z

Hey! We're using reitit and muuntaja in one project. We're trying to have a route return an edn data structure. We manage to get reitit (with the help of muuntaja middlewares) to return an edn string from our route. However, we can't seem to get muuntaja to serialize custom tagged literals like #object[java.time.OffsetDateTime 0x33ef7a96 \"2025-05-21T12:48:40.944825Z\"] , so currently the returned edn string contains these tagged literal. Example of the returned edn string "{:timestamp #object[java.time.OffsetDateTime 0x33ef7a96 \"2025-01-01T12:00:00.000000Z\"]} Is there anyway to get muuntaja or some reitit middleware to serialize tagged literals when encoding edn to strings?

juhoteperi 2025-05-27T09:44:13.963939Z

edn serialization goes through clojure.edn the encoder doesn't take options on how to encode custom classes, instead you just need to extend clojure.core/print-method for those classes

juhoteperi 2025-05-27T09:45:20.013709Z

Similar to this, but for Java.time classes: https://github.com/clj-time/clj-time/blob/b1558aa5b2fc6d052594a3aedca6f23e143a4e5b/src/clj_time/coerce.clj#L122-L125

🙌 1
nnecklace 2025-05-27T10:12:52.216349Z

Thanks! This was precisely what we were looking for!