Reputation: 1492
Wadl can be configured in Dropwizard 0.7.1 like this:
environment
.jersey()
.getResourceConfig()
.getProperties()
.put(ResourceConfig.FEATURE_DISABLE_WADL, Boolean.FALSE);//Create WADL
How can I set it in Dropwizard 0.8.0
Upvotes: 3
Views: 1137
Reputation: 79
import org.glassfish.jersey.server.ServerProperties;
...
environment.jersey().disable(ServerProperties.WADL_FEATURE_DISABLE);
Upvotes: 1
Reputation: 10962
The location of the property key has changed and the map is unmodifiable - so you'll need to use the addProperties
method instead:
import org.glassfish.jersey.server.ServerProperties;
...
Map<String, Object> properties = new HashMap<>();
properties.put(ServerProperties.WADL_FEATURE_DISABLE, false);
environment.jersey().getResourceConfig().addProperties(properties);
And as of 0.8.0 Dropwizard is disabling WADL generation so you'll need to turn it on explicitly.
Upvotes: 8