Problem
Today if you have two WebRest parameterized path binding such as
@WebGet("/get-{entity}-{id}")
...
@WebGet("/get-task-{id}")
...
sisters
While it would intuitive that a GET on /get-task-123 should match the second, there is no guarantee and the order of which the match will happen is very unpredictable.
Solution
Sort the parameterized path (pathVar) with the following precedence rule:
- The path with the longest fixed characters (not counting the
{...} get precedence.