Question

I am trying a documented routes example for Play 2.1.1

routes

# The version parameter is optional. E.g. /api/list-all?version=3.0
GET   /api/list-all         controllers.Api.list(Option[version])

And then

$ play-2.1.1 compile
[error] /home/paul/server/conf/routes:2: Compilation error[`)' expected but `[' found]

What is going wrong?

Was it helpful?

Solution

It should be like this:

GET   /api/list-all         controllers.Api.list(version: Option[String])
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top