In your POM in the block add the following:
<dependency>
<groupId>com.smoketurner</groupId>
<artifactId>dropwizard-swagger</artifactId>
<version>0.9.1-1</version>
</dependency>
In your Application class add the following to initialize:
bootstrap.addBundle(new SwaggerBundle<HelloWorldConfiguration>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(HelloWorldConfiguration configuration) {
return configuration.swaggerBundleConfiguration;
}
});
In your configuration class add the following:
@JsonProperty("swagger")
public SwaggerBundleConfiguration swaggerBundleConfiguration;
In your configuration YAML add the following:
swagger:
resourcePackage: com.example.helloworld