Fork me on GitHub

i want to do reverse routing inside a ring handler, but in my handler function the router is (necessarily) not yet defined because the routes haven't been compiled yet. this example: shows the problem, the router in there has not been defined. I've tried using declare to resolve this mutual dependency but it breaks my use of mount. What's a good pattern for this?


@conan The router is injected into the request and (:reitit.ring/router request) should summon it out.


Ah! Yes that’s what I need, thanks. Have a great weekend


i'm a little stuck on coercion using reitit.coercion.spec. using schema works fine:

{:name       :view/home
 :coercion   reitit.coercion.schema/coercion
 :parameters {:path {:id s/Uuid}}}
how might i go about using spec instead to do the same? i checked in the tests but they all seem to be schema based 🙂


ah jeez this actually worked, i just needed to clear my cache:

{:name       :view/home
 :coercion   reitit.coercion.spec/coercion
 :parameters {:path {:id uuid?}}}

👍 8