@mkvlr taking a look over that as well now
can anyone offer advice on how to disambiguate these routes?
["/custom/notes/images/storage-parameters" :post [...]]
["/custom/notes/:id" :get [...]]
["/custom/notes/:id" :patch [...]]
["/custom/notes/:id/graphic" :get [...]]
["/custom/notes/:id/production-file" :post [...]]
the first one always 404s
Do I have to resort to the linear router here? Can I change routing syntax instead?
@ccann, This behavior to be independent of routing syntax because routes all get expanded to the verbose form. What you are observing is expected behavior for the prefix tree router. As per https://github.com/pedestal/pedestal/pull/330
> 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.
I realize that this documentation is buried deep in the bowels of Pedestal. I plan on updating the routing docs to make this info more visible
If you decide to continue with your existing routes then the linear search router is the way to go.