
io.paradoxical.dropwizard.swagger.EnvironmentSwaggerConfiguration 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
package io.paradoxical.dropwizard.swagger;
import io.dropwizard.jetty.MutableServletContextHandler;
import io.dropwizard.setup.Environment;
import lombok.AccessLevel;
import lombok.Getter;
import javax.annotation.Nullable;
import java.util.function.Function;
public abstract class EnvironmentSwaggerConfiguration extends SwaggerConfiguration {
@Getter(AccessLevel.PROTECTED)
private final Environment environment;
protected EnvironmentSwaggerConfiguration(
@Nullable final Environment environment,
final Function contextSelector) {
this.environment = environment;
if (environment != null) {
setBasePath(contextSelector.apply(environment).getContextPath());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy