Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wildcards in path annnotations #18

Open
adamretter opened this issue Sep 10, 2013 · 2 comments
Open

Wildcards in path annnotations #18

adamretter opened this issue Sep 10, 2013 · 2 comments
Assignees

Comments

@adamretter
Copy link
Member

Wildcards should be allowed in path annotations, and should take the following form -

%rest:path("/a/b/{*}")

This matches any path starting with "/a/b" to be matched, and any remainder of the path is not captured.

%rest:path("/a/b/{$other?}")

This matches a path starting with "/a/b", or the path "/a/b/{X}" where X is captured into the function parameter $other (if X is present, otherwise the empty sequence).

%rest:path("/a/b/{$other+}")

This matches a path starting with "/a/b", or the path "/a/b/{X}" where X is captured into the function parameter $other, or the paths /a/b/{X1}/.../{Xn} where all values of X are captured into function parameter $other.

%rest:path("/a/b/{$other*}")

This matches a path starting with "/a/b", or the path /a/b/{X1}/.../{Xn} where all values of X are captured into function parameter $other (if X is present, otherwise the empty sequence).

@ghost ghost assigned adamretter Sep 10, 2013
@ChristianGruen
Copy link
Member

Related: #3.

@ChristianGruen
Copy link
Member

I would recommend to simply use the JAX-RS syntax. However, regular expressions may then strech over more than one path segment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants