Created
June 24, 2013 11:46
-
-
Save pollingj/5849509 to your computer and use it in GitHub Desktop.
Scalatra Command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class LocationsCommand[S](implicit mf: Manifest[S]) extends ModelCommand[S] with JsonCommand {} | |
class CreateLocationCommand extends LocationsCommand[Location] { | |
protected implicit val jsonFormats = DefaultFormats | |
val name: Field[String] = asString("name").notBlank.minLength(3) | |
val jobs: Field[Int] = asInt("jobs").greaterThan(0) | |
val coordinates: Field[List[Coordinate]] = asType[List[Coordinate]]("coordinate") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This currently gets me the following error:
could not find implicit value for evidence parameter of type org.scalatra.commands.TypeConverterFactory[List[uk.gov.hullcc.api.domain.mongo.Coordinate]]