use of io.federecio.dropwizard.swagger.SwaggerBundle in project legend-engine by finos.
the class Server method initialize.
@Override
public void initialize(Bootstrap<ServerConfiguration> bootstrap) {
bootstrap.addBundle(new AssetsBundle("/web", "/", "legend_index.html"));
bootstrap.addBundle(new SwaggerBundle<ServerConfiguration>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(ServerConfiguration configuration) {
return configuration.swagger;
}
});
bootstrap.addBundle(new HostnameHeaderBundle());
bootstrap.addBundle(new LegendPac4jBundle<>(serverConfiguration -> serverConfiguration.pac4j));
bootstrap.addBundle(new SessionAttributeBundle());
bootstrap.addBundle(new MultiPartBundle());
PureProtocolObjectMapperFactory.withPureProtocolExtensions(bootstrap.getObjectMapper());
VaultFactory.withVaultConfigurationExtensions(bootstrap.getObjectMapper());
ObjectMapperFactory.withStandardConfigurations(bootstrap.getObjectMapper());
bootstrap.getObjectMapper().registerSubtypes(new NamedType(LegendDefaultDatabaseAuthenticationFlowProviderConfiguration.class, "legendDefault"));
}
Aggregations