Binder for play.api.routing.sird router
Binder for play.api.routing.sird router
Example:
scala> import play.api.routing.sird._ scala> import play.api.routing._ scala> import play.api.mvc._ scala> sealed abstract class Greeting(val value: Int) extends IntEnumEntry scala> object Greeting extends IntPlayEnum[Greeting] { | val values = findValues | case object Hello extends Greeting(1) | case object GoodBye extends Greeting(2) | case object Hi extends Greeting(3) | case object Bye extends Greeting(4) | } scala> val router = Router.from { | case GET(p"/hello/${Greeting.fromPath(greeting)}") => Action { | Results.Ok(s"$greeting") | } | } scala> router.routes res0: Router.Routes = <function1>
Implicit path binder for Play's default router
Implicit path binder for Play's default router
Path Bindable implicits for IntEnum