bretthoerner / dropwizard-scala

Scala helpers for Dropwizard.
86 stars 26 forks source link

Wrap the collection/option extractor around the underlying extractor. #3

Closed nbauernfeind closed 11 years ago

nbauernfeind commented 11 years ago

This is all the right stuff, particularly I'm following what Codahale did for Guava's Optional class.

Unfortunately, the type parameters on the method parameters are erased when in a Scala class despite their existence when created via a Java class.

Luckily, @POST methods find a way to give jackson-module-scala all of the type information for body-based parameters when the method consumes JSON. So it should be possible, just need to reproduce what it does.

I'm check pointing this change here so that I can work on cross-compiling several version of scala.

Let me know if anything catches your eye in a bad way.