Fork me on GitHub

Is there some way to work around this issue I have with multiple terminators? I have the following (example) routes:

["/resource/{id}"       {:name :resource/page}]
["/resource/{id}.json"  {:name :resource/json}]
["/resource/{id}/thing" {:name :resource/thing}]
When compiling the routes I get:
Execution error (ExceptionInfo) at reitit.exception/exception (exception.cljc:19).
{:terminators (".json" "/thing"), :path "/resource/{id}"}
I cannot change the URIs of the things as this is an existing service that I'm trying to put reitit into.


A good question. You could force a linear-router (via an option to reitit.core/router), but then you would lose a lot of perf, if that matters. The error is raised from the trie compilation (, don't have a quick solution on how to change that. Long time since that code has been created/touched.


Thx, I'll try the linear router suggestion. Routing perf is probably not that big a deal in this service. 🙏

👍 1