bretthoerner / dropwizard-scala

Scala helpers for Dropwizard.
86 stars 26 forks source link

Explosion of supported Collections as QueryParams. #2

Closed nbauernfeind closed 11 years ago

nbauernfeind commented 11 years ago

Clearly we're missing some functionality when it comes to QueryParams.

This change enables us to cover the same collections as Jackson-Module-Scala (+Vector). I re-used the CompanionSorter I wrote for the module as it was already in scope. You can find its internals here: CompanionSorter.scala

The move to use ParameterizedType instead of purely Class objects on the InjectableProvider is not apparent in this code read, however, I want to wrap the Collection (and Option) based Extractors around an underyling extractor. That is to say, I want to support QueryParameters of Option[Int] and Set[Long]. (So bear with me for another pull request on that change.)