Provide a generic function that can generate Shapeless Generic instances for case classes with a single member, e.g.
import ValueClassUrlBinders._
to get both the ValueClassPathBindable
and ValueClassQueryStringBindable
generators in implicit scope.
import ValueClassUrlBinders._
to get both the ValueClassPathBindable
and ValueClassQueryStringBindable
generators in implicit scope. In particular, add this to your build.sbt
to import them into
the routes file:
routesImport += "com.wellfactored.playbindings.ValueClassUrlBinders._"
Provide a generic function that can generate Shapeless Generic instances for case classes with a single member, e.g.
Foo(s: String)
where theGeneric.Repr
type isString
rather thanString :: HNil
. From this we can build the various binding types that Play uses, i.e. jsonReads
andWrites
instances as well asPathBindable
s andQueryStringBindable
s