Search in sources :

Example 1 with SwaggerBundleConfiguration

use of io.federecio.dropwizard.swagger.SwaggerBundleConfiguration in project registry by hortonworks.

the class RegistryApplication method initialize.

@Override
public void initialize(Bootstrap<RegistryConfiguration> bootstrap) {
    // always deploy UI on /ui. If there is no other filter like Confluent etc, redirect / to /ui
    bootstrap.addBundle(new AssetsBundle("/assets", "/ui", "index.html", "static"));
    bootstrap.addBundle(new SwaggerBundle<RegistryConfiguration>() {

        @Override
        protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(RegistryConfiguration registryConfiguration) {
            return registryConfiguration.getSwaggerBundleConfiguration();
        }
    });
    super.initialize(bootstrap);
}
Also used : AssetsBundle(io.dropwizard.assets.AssetsBundle) SwaggerBundleConfiguration(io.federecio.dropwizard.swagger.SwaggerBundleConfiguration)

Example 2 with SwaggerBundleConfiguration

use of io.federecio.dropwizard.swagger.SwaggerBundleConfiguration in project bisq-api by mrosseel.

the class BisqApiApplication method initialize.

@Override
public void initialize(Bootstrap<ApiConfiguration> bootstrap) {
    bootstrap.setConfigurationSourceProvider(new ResourceConfigurationSourceProvider());
    bootstrap.addBundle(new SwaggerBundle<ApiConfiguration>() {

        @Override
        protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(ApiConfiguration configuration) {
            return configuration.swaggerBundleConfiguration;
        }
    });
    // Overriding settings through environment variables, added to override the http port from 8080 to something else
    // See http://www.dropwizard.io/1.1.4/docs/manual/core.html#configuration
    bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
}
Also used : SubstitutingSourceProvider(io.dropwizard.configuration.SubstitutingSourceProvider) ResourceConfigurationSourceProvider(io.dropwizard.configuration.ResourceConfigurationSourceProvider) EnvironmentVariableSubstitutor(io.dropwizard.configuration.EnvironmentVariableSubstitutor) SwaggerBundleConfiguration(io.federecio.dropwizard.swagger.SwaggerBundleConfiguration)

Example 3 with SwaggerBundleConfiguration

use of io.federecio.dropwizard.swagger.SwaggerBundleConfiguration in project bisq-api by mrosseel.

the class BisqApiApplication method initialize.

@Override
public void initialize(Bootstrap<ApiConfiguration> bootstrap) {
    bootstrap.setConfigurationSourceProvider(new ResourceConfigurationSourceProvider());
    bootstrap.addBundle(new SwaggerBundle<ApiConfiguration>() {

        @Override
        protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(ApiConfiguration configuration) {
            return configuration.swaggerBundleConfiguration;
        }
    });
    // Overriding settings through environment variables, added to override the http port from 8080 to something else
    // See http://www.dropwizard.io/1.1.4/docs/manual/core.html#configuration
    bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
}
Also used : SubstitutingSourceProvider(io.dropwizard.configuration.SubstitutingSourceProvider) ResourceConfigurationSourceProvider(io.dropwizard.configuration.ResourceConfigurationSourceProvider) EnvironmentVariableSubstitutor(io.dropwizard.configuration.EnvironmentVariableSubstitutor) SwaggerBundleConfiguration(io.federecio.dropwizard.swagger.SwaggerBundleConfiguration)

Aggregations

SwaggerBundleConfiguration (io.federecio.dropwizard.swagger.SwaggerBundleConfiguration)3 EnvironmentVariableSubstitutor (io.dropwizard.configuration.EnvironmentVariableSubstitutor)2 ResourceConfigurationSourceProvider (io.dropwizard.configuration.ResourceConfigurationSourceProvider)2 SubstitutingSourceProvider (io.dropwizard.configuration.SubstitutingSourceProvider)2 AssetsBundle (io.dropwizard.assets.AssetsBundle)1