当前位置: 首页>>代码示例>>Java>>正文


Java SwaggerBundle类代码示例

本文整理汇总了Java中io.federecio.dropwizard.swagger.SwaggerBundle的典型用法代码示例。如果您正苦于以下问题:Java SwaggerBundle类的具体用法?Java SwaggerBundle怎么用?Java SwaggerBundle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SwaggerBundle类属于io.federecio.dropwizard.swagger包,在下文中一共展示了SwaggerBundle类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import io.federecio.dropwizard.swagger.SwaggerBundle; //导入依赖的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);
}
 
开发者ID:MineboxOS,项目名称:minebox,代码行数:18,代码来源:MinebdApplication.java

示例2: initialize

import io.federecio.dropwizard.swagger.SwaggerBundle; //导入依赖的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;
    }
  });
}
 
开发者ID:nblair,项目名称:continuous-performance-testing,代码行数:13,代码来源:EndpointApplication.java

示例3: initialize

import io.federecio.dropwizard.swagger.SwaggerBundle; //导入依赖的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();
}
 
开发者ID:LittleMikeDev,项目名称:bitshadow,代码行数:21,代码来源:BitShadowWebService.java

示例4: initialize

import io.federecio.dropwizard.swagger.SwaggerBundle; //导入依赖的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());
}
 
开发者ID:caeos,项目名称:coner-core,代码行数:17,代码来源:ConerCoreApplication.java

示例5: initialize

import io.federecio.dropwizard.swagger.SwaggerBundle; //导入依赖的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)));
}
 
开发者ID:mtakaki,项目名称:CredentialStorageService,代码行数:17,代码来源:CredentialStorageApplication.java

示例6: initialize

import io.federecio.dropwizard.swagger.SwaggerBundle; //导入依赖的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;
    }
  });
}
 
开发者ID:pinterest,项目名称:soundwave,代码行数:14,代码来源:ApiApplication.java

示例7: initialize

import io.federecio.dropwizard.swagger.SwaggerBundle; //导入依赖的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);
}
 
开发者ID:hortonworks,项目名称:registry,代码行数:13,代码来源:RegistryApplication.java

示例8: initialize

import io.federecio.dropwizard.swagger.SwaggerBundle; //导入依赖的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"));
}
 
开发者ID:KainosSoftwareLtd,项目名称:sample-dropwizard-service,代码行数:11,代码来源:SampleApplication.java

示例9: initialize

import io.federecio.dropwizard.swagger.SwaggerBundle; //导入依赖的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();
        }
    });
}
 
开发者ID:NLeSC,项目名称:ahn-pointcloud-viewer-ws,代码行数:16,代码来源:ViewerApplication.java

示例10: initialize

import io.federecio.dropwizard.swagger.SwaggerBundle; //导入依赖的package包/类
@Override
public void initialize(final Bootstrap<AccountServiceConfiguration> bootstrap) {
    bootstrap.addBundle(new SwaggerBundle<AccountServiceConfiguration>() {
        @Override
        protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(final AccountServiceConfiguration configuration) {
            return configuration.getSwaggerBundleConfiguration();
        }
    });
}
 
开发者ID:bitionaire,项目名称:el-bombillo,代码行数:10,代码来源:AccountServiceApplication.java

示例11: initialize

import io.federecio.dropwizard.swagger.SwaggerBundle; //导入依赖的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;
        }
    });

}
 
开发者ID:UKHomeOffice,项目名称:email-api,代码行数:16,代码来源:EmailApiApplication.java

示例12: initialize

import io.federecio.dropwizard.swagger.SwaggerBundle; //导入依赖的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;
        }
    });
}
 
开发者ID:SeaCloudsEU,项目名称:SeaCloudsPlatform,代码行数:29,代码来源:DashboardApplication.java


注:本文中的io.federecio.dropwizard.swagger.SwaggerBundle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。