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

support multiple path patterns per route/handler #37

Closed
jknack opened this issue Mar 6, 2015 · 0 comments
Closed

support multiple path patterns per route/handler #37

jknack opened this issue Mar 6, 2015 · 0 comments
Labels
Milestone

Comments

@jknack
Copy link
Member

jknack commented Mar 6, 2015

a common example is to have a create/update handler where the id is optional for create and present for update, something like:

post("/model", "/model/:id", req -> {
  Optional<String> id = req.param("id").toOptional(String.class);
  ...
});

In addition org.jooby.mvc.Path should support multiples patterns too:

@Path({"/model", "/model/:id"})
@GET
public Object createORUpdate(Optional<String> id) {
  ...
}
@jknack jknack added the feature label Mar 6, 2015
@jknack jknack added this to the 0.5.0 milestone Mar 6, 2015
@jknack jknack closed this as completed in bd0e00c Mar 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant