hello! iโm stuck with com.fasterxml.jackson.core/jackson-core 2.12.3 on Datomic Ions, where the latest metosin/jsonista fails to compile. whatโs the latest version of metosin/reitit i can get away with? perhaps https://github.com/metosin/reitit/blob/0.5.18/project.clj?
We are using 0.6.0 (the latest non-alpha release) but with the caveat that you can't depend on the 'all bundled' reitit. Specifically, we found that it was reitit-swagger-ui that caused the clash with datomic ions.
So instead of (which pulls in all modules):
[metosin/reitit "0.6.0"]
We list only the modules that we use:
metosin/reitit-core {:mvn/version "0.6.0"}
metosin/reitit-ring {:mvn/version "0.6.0"}
metosin/reitit-middleware {:mvn/version "0.6.0"}
metosin/reitit-malli {:mvn/version "0.6.0"}
metosin/reitit-swagger {:mvn/version "0.6.0"}
metosin/reitit-sieppari {:mvn/version "0.6.0"}
metosin/reitit-dev {:mvn/version "0.6.0"}
You might have to list some other modules, depending on if you use spec/schema/interceptors.
Remember that you have to remove the route that serves the swagger-ui. This is only the static assets for the front-end that is used to browse the API documentation, it does not affect the generation of swagger.json file itself. We just host the swagger-ui somewhere else - it's just some HTML & JavaScript that you can get from the Swagger website (if you are using Swagger, that is).hi @andre.richards, really great of you to help. thank you. we eventually settled on the same solution: use the latest stable reitit release excluding swagger-ui, and host the static ui somewhere else. it would have been nice to package the json and the ui in one place, but oh well ๐
Yip. Sorry I only saw this now, could've saved you some time investigating the issue again... ๐
thanks just the same. at least we had a learning opportunity!
In reitit, Is there a favorite way to set basic request info (url, method) that the Thread$UncaughtExceptionHandler will see?
I could use thread-local storage, but it's often inadequate (e.g. what if I'm using an async server)
There's also dynamic bindings (as implied by e,g, timbre/with-context ) but those can be easily lost
Sounds like something that reitit.ring.middleware.exception/create-exception-middleware can be tweaked to do ๐ค duckie