Fork me on GitHub

Hey, so I'm running into some behaviour that I can't quite explain. I have two routes defined in table syntax: #{["/foos/search" :get [..] :route-name :search] ["/foos/:foo-id/bar" :post [..] :route-name :bar]}; the presence of the second route makes the system return a 404 for the first. This leads me to believe they are conflicting, but both the verbs and the route-names are different? I can't seem to explain this. We are on io.pedestal/pedestal.route {:mvn/version "0.5.3"}.


@dadair it's by design: > The prefix-tree router also changes some of the routing behavior. In the linear-search, you could have routes like /one/:wild and /one/two, the latter being a hard match and the former picking up any wildcard URL matches (not /one/two). In the prefix-tree, this isn't allowed, and one/:wild will always be matched. This change also encourages "best practices" and removes the possibility of subtle bugs introduced by human error.


@dadair refer to You’ll want to use the Linear Search router instead


Ah ok thank you; the reference docs on the website are a bit misleading, they state (iirc) that as long as verb and name differ, there is no collision


I’ll take a look at the other routers


couldn't one just be linear for that part of the tree?