wordnik/swagger-core — pull request #90 by cb372 (2012-12-13 09:59:16+00:00)
Title: Dropwizard support: Look for init-params in ServletContext as well as Servlet.

Dropwizard supports passing of init-params to the ServletContext, but (as far I can tell) there is no way to pass init-params to the Jersey Servlet. This means that Swagger is unable to find its configuration parameters (api.version, swagger.api.basepath, etc.).

This simple fix tells Swagger to check both the Servlet's and the ServletContext's init-params when looking for its configuration. So the required parameters can be passed to Swagger via the Dropwizard config file:

```yaml
http:
contextParameters:
swagger.api.basepath: http://localhost:8080
api.version: 1.0
```