Skip to content

Instantly share code, notes, and snippets.

@pollingj
Created June 24, 2013 11:46
Show Gist options
  • Save pollingj/5849509 to your computer and use it in GitHub Desktop.
Save pollingj/5849509 to your computer and use it in GitHub Desktop.
Scalatra Command
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")
}
@pollingj
Copy link
Author

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]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment