
io.paradoxical.dropwizard.swagger.bundles.SwaggerUIBundle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dropwizard-swagger Show documentation
Show all versions of dropwizard-swagger Show documentation
Swagger managment on the admin resource for dropwizard
The newest version!
package io.paradoxical.dropwizard.swagger.bundles;
import io.dropwizard.setup.Environment;
import io.paradoxical.dropwizard.bundles.assets.AssetsDefinition;
import io.paradoxical.dropwizard.bundles.assets.AssetsDefinitionBundle;
import io.paradoxical.dropwizard.swagger.SwaggerAssets;
import io.paradoxical.dropwizard.swagger.SwaggerUIConfigurator;
import lombok.NonNull;
public class SwaggerUIBundle extends AssetsDefinitionBundle {
private final SwaggerUIConfigurator swaggerUIConfigurator;
public SwaggerUIBundle(@NonNull final SwaggerUIConfigurator swaggerUIConfigurator) {
this(SwaggerAssets.Assets, swaggerUIConfigurator);
}
public SwaggerUIBundle(@NonNull final AssetsDefinition assets, @NonNull final SwaggerUIConfigurator swaggerUIConfigurator) {
super(assets);
this.swaggerUIConfigurator = swaggerUIConfigurator;
}
@Override
public void run(final Environment environment) {
super.run(environment);
swaggerUIConfigurator.configure(environment, environment.jersey());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy