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

Provide directive composition capabilities for Java DSL #620

Closed
jlprat opened this issue Dec 6, 2016 · 1 comment
Closed

Provide directive composition capabilities for Java DSL #620

jlprat opened this issue Dec 6, 2016 · 1 comment
Labels
help wanted Identifies issues that the core team will likely not have time to work on t:java Issues related to the Java DSL t:routing Issues related to the routing DSL
Milestone

Comments

@jlprat
Copy link
Member

jlprat commented Dec 6, 2016

Currently Java DSL only offers route composition. In order to bring the Java DSL at par with the Scala DSL, it would be good to be able to apply composition at Directive level.
At the end it should be possible to write:

val route =
  path("order" / IntNumber) { id =>
    (get | put) { 
      complete(s"Received request for order $id")
    }
  }

like

return path(segment("order").slash(integerSegment()), id -> 
  orElse(Directives::get, Directives::put, () -> 
    complete("Received request for order " + id)
  )
)
@jlprat
Copy link
Member Author

jlprat commented Dec 6, 2016

I could dive into this one as well 😄

@jrudolph jrudolph added 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted help wanted Identifies issues that the core team will likely not have time to work on t:java Issues related to the Java DSL t:routing Issues related to the routing DSL labels Dec 6, 2016
jlprat added a commit to jlprat/akka-http that referenced this issue Jan 10, 2017
Issue: akka#620
* AnyOf
* AllOf
* bindParameter in PartialApplication
Provide examples and docs
Add `ApiMayChange` annotation as comments
jlprat added a commit to jlprat/akka-http that referenced this issue Jan 10, 2017
* AnyOf
* AllOf
* bindParameter in PartialApplication
Provide examples and docs
Add `ApiMayChange` annotation as comments
ktoso pushed a commit that referenced this issue Jan 10, 2017
* AnyOf
* AllOf
* bindParameter in PartialApplication
Provide examples and docs
Add `ApiMayChange` annotation as comments
@ktoso ktoso closed this as completed Jan 10, 2017
@ktoso ktoso removed the 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted label Jan 10, 2017
@ktoso ktoso added this to the 10.0.2 milestone Jan 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Identifies issues that the core team will likely not have time to work on t:java Issues related to the Java DSL t:routing Issues related to the routing DSL
Projects
None yet
Development

No branches or pull requests

3 participants