本文整理汇总了Java中com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin类的典型用法代码示例。如果您正苦于以下问题:Java SwaggerSpringMvcPlugin类的具体用法?Java SwaggerSpringMvcPlugin怎么用?Java SwaggerSpringMvcPlugin使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SwaggerSpringMvcPlugin类属于com.mangofactory.swagger.plugin包,在下文中一共展示了SwaggerSpringMvcPlugin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: customImplementation
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Bean
public SwaggerSpringMvcPlugin customImplementation() {
return new SwaggerSpringMvcPlugin(this.springSwaggerConfig)
.apiInfo(apiInfo())
.pathProvider(new SwaggerPathProvider() {
@Override
protected String applicationPath() {
return servletContext.getContextPath() + "/restapi";
}
@Override
protected String getDocumentationPath() {
return "/";
}
})
.includePatterns(".*").useDefaultResponseMessages(false);
}
示例2: swaggerSpringMvcPlugin
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean
public SwaggerSpringMvcPlugin swaggerSpringMvcPlugin() {
CustomModelPropertiesProvider propertiesProvider = new CustomModelPropertiesProvider(defaultModelPropertiesProvider, alternateTypeProvider, new CustomAccessorsProvider(typeResolver));
ModelDependencyProvider modelDependencyProvider = new ModelDependencyProvider(typeResolver, alternateTypeProvider, propertiesProvider);
DefaultModelProvider modelProvider = new DefaultModelProvider(typeResolver, alternateTypeProvider, propertiesProvider, modelDependencyProvider);
return new SwaggerSpringMvcPlugin(springSwaggerConfig)
.modelProvider(modelProvider)
.alternateTypeRules(
new GenericAlternateTypeRule(ResponseEntity.class, 0, null, null),
new GenericAlternateTypeRule(DeferredResult.class, 0, null, null),
new GenericAlternateTypeRule(Future.class, 0, null, null),
new GenericAlternateTypeRule(scala.concurrent.Future.class, 0, null, null))
.apiVersion(appVersion)
.apiInfo(new ApiInfo(null, null, null, null, null, null));
}
示例3: customImplementation
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
/**
* Every SwaggerSpringMvcPlugin bean is picked up by the swagger-mvc
* framework - allowing for multiple swagger groups i.e. same code base
* multiple swagger resource listings.
*/
@Bean
public SwaggerSpringMvcPlugin customImplementation()
{
return new SwaggerSpringMvcPlugin(this.springSwaggerConfig).apiInfo(apiInfo()).includePatterns(
".*?");
}
示例4: customImplementation
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean
public SwaggerSpringMvcPlugin customImplementation() {
// TypeResolver typeResolver = new TypeResolver();
// AlternateTypeRule rules = Alternates.newRule(
// typeResolver.resolve(ResponseEntity.class, WildcardType.class),
// //with List<T> for any T
// typeResolver.resolve(List.class, WildcardType.class));
return new SwaggerSpringMvcPlugin(this.springSwaggerConfig)
.apiInfo(apiInfo())
.includePatterns(".*/*.*")
.genericModelSubstitutes(List.class);
}
示例5: groupOnePlugin
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean
public SwaggerSpringMvcPlugin groupOnePlugin() {
return new SwaggerSpringMvcPlugin(springSwaggerConfig).
apiInfo(apiInfo()).
includePatterns("/api/.*").
swaggerGroup("erudio");
}
示例6: customImplementation
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
/**
* Every SwaggerSpringMvcPlugin bean is picked up by the swagger-mvc framework - allowing for multiple
* swagger groups i.e. same code base multiple swagger resource listings.
*/
@Bean
public SwaggerSpringMvcPlugin customImplementation(){
return new SwaggerSpringMvcPlugin(this.springSwaggerConfig)
.includePatterns(".*").apiInfo(new ApiInfo(
"Cloudstreet Market / Swagger UI",
"The Rest API developed with Spring MVC Cookbook [PACKT]",
"",
"[email protected]",
"GNU GENERAL PUBLIC LICENSE v2",
"http://www.gnu.org/licenses/gpl-2.0.html"));
}
示例7: customImplementation
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean
public SwaggerSpringMvcPlugin customImplementation() {
springSwaggerConfig.defaultSwaggerPathProvider().setApiResourcePrefix("api");
return new SwaggerSpringMvcPlugin(springSwaggerConfig).apiInfo(apiInfo())
.includePatterns(includePattern)
.ignoredParameterTypes(Model.class);
}
示例8: customImplementation
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
/**
* Every SwaggerSpringMvcPlugin bean is picked up by the swagger-mvc framework - allowing for multiple
* swagger groups i.e. same code base multiple swagger resource listings.
*/
@Bean
public SwaggerSpringMvcPlugin customImplementation() {
return new SwaggerSpringMvcPlugin(this.springSwaggerConfig)
// .includePatterns(".*pet.*");
.includePatterns(".*?");
}
示例9: customImplementation
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean //Don't forget the @Bean annotation
public SwaggerSpringMvcPlugin customImplementation()
{
return new SwaggerSpringMvcPlugin( this.springSwaggerConfig )
.apiInfo( apiInfo() )
.includePatterns( ".*api.*" );
}
示例10: swaggerSpringMvcPlugin
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
/**
* Swagger Spring MVC configuration
*/
@Bean
public SwaggerSpringMvcPlugin swaggerSpringMvcPlugin(SpringSwaggerConfig springSwaggerConfig) {
return new SwaggerSpringMvcPlugin(springSwaggerConfig)
.apiInfo(apiInfo())
.genericModelSubstitutes(ResponseEntity.class)
.includePatterns(DEFAULT_INCLUDE_PATTERN);
}
示例11: swaggerSpringMvcPlugin
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
/**
* Every SwaggerSpringMvcPlugin bean is picked up by the swagger-mvc framework - allowing for multiple
* swagger groups i.e. same code base multiple swagger resource listings.
*/
@Bean //Don't forget the @Bean annotation
public SwaggerSpringMvcPlugin swaggerSpringMvcPlugin(){
return new SwaggerSpringMvcPlugin(this.springSwaggerConfig)
.apiInfo(apiInfo())
.genericModelSubstitutes(ResponseEntity.class)
.build();
}
示例12: customImplementation
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean
public SwaggerSpringMvcPlugin customImplementation(){
SwaggerSpringMvcPlugin mvcPlugin = new SwaggerSpringMvcPlugin(this.springSwaggerConfig);
mvcPlugin
.apiInfo(apiInfo())
.ignoredParameterTypes(Authentication.class, Principal.class)
.excludeAnnotations(new Class[]{Controller.class})
.authorizationTypes(authTypes())
.authorizationContext(authContext()) ;
return mvcPlugin;
}
示例13: apiImplementation
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean
public SwaggerSpringMvcPlugin apiImplementation(){
return new SwaggerSpringMvcPlugin(this.swaggerConfig)
.apiInfo(apiInfo())
.pathProvider(this.pathProvider);
}
示例14: customImplementation
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean
public SwaggerSpringMvcPlugin customImplementation() {
return new SwaggerSpringMvcPlugin(this.springSwaggerConfig).apiInfo(apiInfo()).includePatterns("/.*");
}
示例15: customImplementation
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean //Don't forget the @Bean annotation
public SwaggerSpringMvcPlugin customImplementation(){
return new SwaggerSpringMvcPlugin(this.springSwaggerConfig)
.apiInfo(apiInfo()).apiVersion("1.0").includePatterns(".*apis.*");
}