using custom unmarshallers / json formats in the parameters directive for spray-routing is throwing the error
"too many arguments for method parameters: (pdm: spray.routing.directives.ParamDefMagnet)pdm.Out"
I've tried to use both a custom Unmarshaller and a Json Formatter both yeild the same error.
Here is the code...(nothing special but LocalDate is a joda.time class)
parameters('accountIds, 'startDate.as[LocalDate], 'endDate.as[LocalDate]) {
(ids, sDate, eDate) => compete ("aw shucks") }
Here is the test is checking both the as[T] and as(Unmarshaller) syntax
"JsonString" should {
"convert application/json to LocalDate" in {
val subject = HttpEntity(MediaTypes.`application/json`, "2010-10-10")
val num = HttpEntity(MediaTypes.`application/json`, "2")
subject.as(LocalDateUnmarshaller) should be (Right(new LocalDate("2010-10-10")))
subject.as[LocalDate] should be (Right(new LocalDate("2010-10-10")))
}
}
any idea on what I could be doing wrong here?
Thanks,
Conor