本文整理汇总了Java中io.federecio.dropwizard.swagger.SwaggerBundleConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java SwaggerBundleConfiguration类的具体用法?Java SwaggerBundleConfiguration怎么用?Java SwaggerBundleConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SwaggerBundleConfiguration类属于io.federecio.dropwizard.swagger包,在下文中一共展示了SwaggerBundleConfiguration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; //导入依赖的package包/类
@Override
public void initialize(Bootstrap<ApiConfig> bootstrap) {
guiceBundle = GuiceBundle.<ApiConfig>newBuilder()
.setConfigClass(ApiConfig.class)
.addModule(new MineBdModule())
.build();
bootstrap.addBundle(guiceBundle);
SwaggerBundle<ApiConfig> swagger = new SwaggerBundle<ApiConfig>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(ApiConfig configuration) {
return configuration.swagger;
}
};
bootstrap.addBundle(swagger);
}
示例2: initialize
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; //导入依赖的package包/类
@Override
public void initialize(final Bootstrap<EndpointConfiguration> bootstrap) {
bootstrap.getObjectMapper().configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
bootstrap.addBundle(new SwaggerBundle<EndpointConfiguration>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(
EndpointConfiguration configuration) {
return configuration.swagger;
}
});
}
示例3: initialize
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; //导入依赖的package包/类
@Override
public void initialize(Bootstrap<BitShadowConfiguration> bootstrap) {
bootstrap.addBundle(GuiceBundle.builder()
.modules(new BitShadowWebModule())
.build()
);
bootstrap.addBundle(new SwaggerBundle<BitShadowConfiguration>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(BitShadowConfiguration configuration) {
return configuration.swaggerBundleConfiguration;
}
});
bootstrap.getObjectMapper()
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE)
.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY)
.findAndRegisterModules();
}
示例4: initialize
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; //导入依赖的package包/类
@Override
public void initialize(
Bootstrap<ConerCoreConfiguration> bootstrap
) {
bootstrap.addBundle(getHibernateBundle());
bootstrap.addBundle(new SwaggerBundle<ConerCoreConfiguration>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(
ConerCoreConfiguration configuration
) {
return configuration.getSwaggerBundleConfiguration();
}
});
JacksonUtil.configureObjectMapper(bootstrap.getObjectMapper());
}
示例5: initialize
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; //导入依赖的package包/类
@Override
public void initialize(final Bootstrap<CredentialStorageConfiguration> bootstrap) {
bootstrap.addBundle(this.circuitBreakerBundle);
bootstrap.addBundle(this.petite);
bootstrap.addBundle(this.adminResourceBundle);
bootstrap.addBundle(new SwaggerBundle<CredentialStorageConfiguration>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(
final CredentialStorageConfiguration configuration) {
return configuration.getSwaggerBundleConfiguration();
}
});
bootstrap.setConfigurationSourceProvider(
new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(),
new EnvironmentVariableSubstitutor(false)));
}
示例6: initialize
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; //导入依赖的package包/类
@Override
public void initialize(final Bootstrap<ApiConfiguration> bootstrap) {
// TODO: application initialization
bootstrap.addBundle(new SwaggerBundle<ApiConfiguration>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(
ApiConfiguration configuration) {
SwaggerBundleConfiguration config = new SwaggerBundleConfiguration();
config.setResourcePackage("com.pinterest.soundwave");
return config;
}
});
}
示例7: initialize
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; //导入依赖的package包/类
@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);
}
示例8: initialize
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; //导入依赖的package包/类
@Override
public void initialize(Bootstrap<SampleConfiguration> bootstrap) {
bootstrap.addBundle(new SwaggerBundle<SampleConfiguration>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(SampleConfiguration configuration) {
return configuration.swaggerBundleConfiguration;
}
});
bootstrap.addBundle(RamlView.bundle("apispec.raml"));
}
示例9: initialize
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; //导入依赖的package包/类
@Override
public void initialize(Bootstrap<ViewerConfiguration> bootstrap) {
// Enable variable substitution with environment variables
bootstrap.setConfigurationSourceProvider(
new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(),
new EnvironmentVariableSubstitutor(false)
)
);
bootstrap.addBundle(new SwaggerBundle<ViewerConfiguration>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(ViewerConfiguration configuration) {
return configuration.getSwagger();
}
});
}
示例10: initialize
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; //导入依赖的package包/类
@Override
public void initialize(final Bootstrap<AccountServiceConfiguration> bootstrap) {
bootstrap.addBundle(new SwaggerBundle<AccountServiceConfiguration>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(final AccountServiceConfiguration configuration) {
return configuration.getSwaggerBundleConfiguration();
}
});
}
示例11: initialize
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; //导入依赖的package包/类
@Override
public void initialize(final Bootstrap<EmailApiConfiguration> bootstrap) {
bootstrap.setConfigurationSourceProvider(
new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(),
new EnvironmentVariableSubstitutor()));
bootstrap.addBundle(new SwaggerBundle<EmailApiConfiguration>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(
EmailApiConfiguration configuration) {
return configuration.swaggerBundleConfiguration;
}
});
}
示例12: initialize
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; //导入依赖的package包/类
@Override
public void initialize(Bootstrap<DashboardConfiguration> bootstrap) {
// Setting configuration from env variables
bootstrap.setConfigurationSourceProvider(
new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(),
new EnvironmentVariableSubstitutor(false)
)
);
// Routing static assets files
bootstrap.addBundle(new AssetsBundle("/webapp", "/", "index.html"));
// Routing API documentation
bootstrap.addBundle(new SwaggerBundle<DashboardConfiguration>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(DashboardConfiguration configuration) {
SwaggerBundleConfiguration swaggerBundleConfiguration = configuration.getSwaggerBundleConfiguration();
swaggerBundleConfiguration.setTitle("SeaClouds REST API");
swaggerBundleConfiguration.setDescription("This API allows to manage all the project functionality");
swaggerBundleConfiguration.setResourcePackage("eu.seaclouds.platform.dashboard.rest");
swaggerBundleConfiguration.setContact("[email protected]");
swaggerBundleConfiguration.setLicense("Apache 2.0");
swaggerBundleConfiguration.setLicenseUrl("http://www.apache.org/licenses/LICENSE-2.0");
return swaggerBundleConfiguration;
}
});
}
示例13: setSwaggerBundleConfiguration
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; //导入依赖的package包/类
public void setSwaggerBundleConfiguration(SwaggerBundleConfiguration swaggerBundleConfiguration) {
this.swaggerBundleConfiguration = swaggerBundleConfiguration;
}
示例14: getSwaggerBundleConfiguration
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; //导入依赖的package包/类
public SwaggerBundleConfiguration getSwaggerBundleConfiguration() {
return swaggerBundleConfiguration;
}
示例15: buildSwaggerConf
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; //导入依赖的package包/类
private void buildSwaggerConf() {
swagger = new SwaggerBundleConfiguration();
swagger.setResourcePackage("nl.esciencecenter.ahn.pointcloud.resources");
swagger.setTitle("AHN point cloud viewer web service");
}