Hi, all. What’s the right way to transform route data prior to passing it to reitit-ring/router
? Say I want to add some additional [:swagger :tags]
based on my own keys I’ve added at points in the tree. I looked at adding an :expand
fn, but data
coming in there is pre-meta-merge.
Just reading up on composing routers. So would it be something like this?
(-> route-defs ring/router ring/routes transform-routes ring/router)
@frankleonrose yes, there could be a new callback fn for this.
with the current workaround, it's doing the conflict resolution twice.
but, should work.
Thanks! If I understand correctly, second pass on conflict resolution should result in no change (assuming my transform doesn’t change paths).
yes, just wasted cpu cycles.