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

Feature Proposal: multiple rest:path per function #38

Open
mathias-goebel opened this issue Feb 28, 2019 · 1 comment
Open

Feature Proposal: multiple rest:path per function #38

mathias-goebel opened this issue Feb 28, 2019 · 1 comment

Comments

@mathias-goebel
Copy link
Contributor

I suggest the possibility to add multiple path annotations to a single function. The use case is to enable a version part on a path as well as a latest part on the same level which will result in a good handling of different versions. Currently a wrapper function is needed to create a second path for a single function.
e.g.:

declare
  %rest:GET
  %rest:path("/api/v1/something")
function local:something(){
1 * 2
};

declare
  %rest:GET
  %rest:path("/api/v2/something")
  %rest:path("/api/latest/something")
function local:something-new(){
1 + 2
};
@ChristianGruen
Copy link
Member

In JAX-RS, paths can be regular expressions. Maybe this would be another option?

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

No branches or pull requests

2 participants