Skip to content

Makes parameterized path matching order more intuitive and predictable #56

@jeremychone

Description

@jeremychone

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions