Fork me on GitHub
#pedestal
<
2018-09-08
>
ikitommi08:09:47

Built a demo of using reitit-router (with all the add-ons) with Pedestal: https://github.com/ikitommi/reitit-pedestal-swagger

ikitommi08:09:39

Not sure if that’s the best way to swap the default router, comments welcome.

ikitommi08:09:05

e.g. used the default-interceptor chain with empty routes and replaced the last interceptor in the chain (the router) with a custom one. Feels bit hacky.

dadair15:09:24

Does the router interceptor have a qualified name? Could search for the router in the interceptor list and swap it, instead of assuming last position?

ikitommi15:09:45

@dadair sounds like a good idea, it seems to have a name :io.pedestal.http.route/router. Easy to do, but are there any existing helpers to swap a interceptor by name?

dadair16:09:11

Looking at the codex I don’t think so, and I’d doubt it given that it’s a pure data transformation.

dadair19:09:58

btw I recently swapped out my content-negotiation interceptors with muuntaja, works great! Thanks for all of Metosin’s great libs!

ikitommi07:09:59

cool, thanks!