springfox.documentation.builders.ApiInfoBuilder Java Examples

The following examples show how to use springfox.documentation.builders.ApiInfoBuilder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: mPaaS   Author: lihangqi   File: SwaggerConfig.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * 动态产生Docket分组信息
 *
 * @return
 */
@Autowired
public void dynamicConfiguration() {
    ConfigurableApplicationContext context = (ConfigurableApplicationContext) applicationContext;
    DefaultListableBeanFactory beanFactory = (DefaultListableBeanFactory) context.getBeanFactory();

    String systemName = "Microservice PaaS";
    ApiInfoBuilder apiInfoBuilder = new ApiInfoBuilder()
            .description("mPaas前端后端对应接口")
            .version("1.0.1")
            .license("Code Farmer Framework(iByte) Org.");

    Map<String, ModuleMappingInfo> moduleInfo = mappingHelper.getMappingInfos();
    for (Map.Entry<String, ModuleMappingInfo> entry : moduleInfo.entrySet()) {
        beanFactory.registerSingleton(entry.getKey(), new Docket(DocumentationType.SWAGGER_2)
                .groupName(entry.getKey())
                .apiInfo(apiInfoBuilder.title(systemName + NamingConstant.DOT + entry.getKey()).build())
                .select()
                .apis(genSubPackage(entry.getKey()))
                .paths(Predicates.or(PathSelectors.ant(NamingConstant.PATH_PREFIX_DATA + "/**"),
                        PathSelectors.ant(NamingConstant.PATH_PREFIX_API + "/**")))
                .build());
    }
}
 
Example #2
Source Project: jeecg-boot-with-activiti   Author: smallyunet   File: Swagger2Config.java    License: MIT License 6 votes vote down vote up
/**
	 * api文档的详细信息函数,注意这里的注解引用的是哪个
	 *
	 * @return
	 */
	private ApiInfo apiInfo() {
		return new ApiInfoBuilder()
				// //大标题
				.title("Jeecg-Boot 后台服务API接口文档")
				// 版本号
				.version("1.0")
//				.termsOfServiceUrl("NO terms of service")
				// 描述
				.description("后台API接口")
				// 作者
				.contact("JEECG团队")
                .license("The Apache License, Version 2.0")
                .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
				.build();
	}
 
Example #3
Source Project: pig   Author: magicgis   File: SwaggerConfig.java    License: MIT License 5 votes vote down vote up
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("Pig Swagger API ")
            .description("https://gitee.com/log4j/pig/wikis")
            .termsOfServiceUrl("https://gitee.com/log4j/pig")
            .contact(new Contact("冷冷","https://gitee.com/log4j/pig","[email protected]"))
            .version("1.0")
            .build();
}
 
Example #4
Source Project: spring-boot-plus   Author: geekidea   File: Swagger2Config.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 获取apiInfo
 *
 * @return
 */
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title(swaggerProperties.getTitle())
            .description(swaggerProperties.getDescription())
            .termsOfServiceUrl(swaggerProperties.getUrl())
            .contact(new Contact(swaggerProperties.getContactName(), swaggerProperties.getContactUrl(), swaggerProperties.getContactEmail()))
            .version(swaggerProperties.getVersion())
            .build();
}
 
Example #5
Source Project: SuperBoot   Author: 7040210   File: Swagger2Config.java    License: MIT License 5 votes vote down vote up
private ApiInfo apiInfo() {
    // 创建API的基本信息,这些信息会在Swagger UI中进行显示
    return new ApiInfoBuilder()
            // API 标题
            .title("接口文档服务")
            // API描述
            .description("默认接口调用需要使用TOKEN,请传入TOKEN后进行接口验证")
            .contact(new Contact("SuperBoot", "http://www.superboot.org", "[email protected]"))
            // 版本号
            .version("1.0-SNAPSHOT")
            .build();
}
 
Example #6
Source Project: mall-learning   Author: macrozheng   File: Swagger2Config.java    License: Apache License 2.0 5 votes vote down vote up
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("SwaggerUI演示")
            .description("mall-tiny")
            .contact("macro")
            .version("1.0")
            .build();
}
 
Example #7
Source Project: DBus   Author: BriData   File: SwaggerConfig.java    License: Apache License 2.0 5 votes vote down vote up
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("DBus Keeper Service")
            .description("basic interface for dbus management")
            .license("Apache 2.0")
            .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
            .termsOfServiceUrl("")
            .version(VERSION)
            .contact(new Contact("DBus", "https://github.com/BriData/DBus", "[email protected]"))
            .build();
}
 
Example #8
Source Project: data-highway   Author: HotelsDotCom   File: TestDriveSwaggerConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
@Bean
public Docket testdriveSwagger() {
  return new Docket(SWAGGER_2)
      .groupName("testdrive")
      .apiInfo(new ApiInfoBuilder().title("Test Drive").build())
      .useDefaultResponseMessages(false)
      .tags(new Tag("testdrive", "Test Drive"))
      .select()
      .paths(PathSelectors.regex("/testdrive.*"))
      .build();
}
 
Example #9
Source Project: HIS   Author: TANGKUO   File: Swagger2Config.java    License: Apache License 2.0 5 votes vote down vote up
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("HIS-CLOUD-SERVICE-DMS")
            .description("基于restful的HIS接口")
            .contact("neu")
            .version("1.0")
            .build();
}
 
Example #10
Source Project: spring-cloud-yes   Author: eacdy   File: SwaggerConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * swagger 信息
 *
 * @return 页面信息
 */
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("消费者API")
            .description("消费者API")
            .termsOfServiceUrl("")
            .version("1.0.0")
            .contact(new Contact("", "", "")).build();
}
 
Example #11
Source Project: alcor   Author: futurewei-cloud   File: SwaggerConfig.java    License: Apache License 2.0 5 votes vote down vote up
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("Security Group Manager")
            .description("Security Group lifecycle management")
            .license("Apache 2.0")
            .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
            .build();
}
 
Example #12
Source Project: springBoot-study   Author: xuwujing   File: Swagger2.java    License: Apache License 2.0 5 votes vote down vote up
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("Spring Boot中使用Swagger2构建RESTful APIs")
            .description("测试")
            .termsOfServiceUrl("http://www.panchengming.com/")
            .contact("xuwujing")
            .version("1.0")
            .build();
}
 
Example #13
Source Project: mall-learning   Author: macrozheng   File: Swagger2Config.java    License: Apache License 2.0 5 votes vote down vote up
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("SwaggerUI演示")
            .description("mall-tiny")
            .contact("macro")
            .version("1.0")
            .build();
}
 
Example #14
Source Project: dew   Author: gudaoxuri   File: DocAutoConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
private ApiInfo apiInfo() {
    ApiInfoBuilder builder = new ApiInfoBuilder()
            .title(dewConfig.getBasic().getName())
            .description(dewConfig.getBasic().getDesc())
            .termsOfServiceUrl(dewConfig.getBasic().getWebSite())
            .version(dewConfig.getBasic().getVersion());
    if (dewConfig.getBasic().getDoc().getContact() != null) {
        builder.contact(new Contact(
                dewConfig.getBasic().getDoc().getContact().getName(),
                dewConfig.getBasic().getDoc().getContact().getUrl(),
                dewConfig.getBasic().getDoc().getContact().getEmail()
        ));
    }
    return builder.build();
}
 
Example #15
Source Project: spring-cloud-yes   Author: eacdy   File: SwaggerConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * swagger 信息
 *
 * @return 页面信息
 */
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("内容中心API")
            .description("内容中心API")
            .termsOfServiceUrl("")
            .version("1.0.0")
            .contact(new Contact("", "", "")).build();
}
 
Example #16
Source Project: flash-waimai   Author: microapp-store   File: Swagger2Configuration.java    License: MIT License 5 votes vote down vote up
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("flash-waimai api")
            .description("快速构建外卖系统")
            .termsOfServiceUrl("microapp.store")
            .contact("www.microapp.store")
            .version("1.0")
            .build();
}
 
Example #17
Source Project: openapi-generator   Author: OpenAPITools   File: OpenAPIDocumentationConfig.java    License: Apache License 2.0 5 votes vote down vote up
ApiInfo apiInfo() {
    return new ApiInfoBuilder()
        .title("OpenAPI Petstore")
        .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\")
        .license("Apache-2.0")
        .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html")
        .termsOfServiceUrl("")
        .version("1.0.0")
        .contact(new Contact("","", ""))
        .build();
}
 
Example #18
Source Project: myth   Author: Dromara   File: SwaggerConfig.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Api info api info.
 *
 * @return the api info
 */
ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("Swagger API")
            .description("motan框架 基于mq分布式事务解决方案  测试体验")
            .license("Apache 2.0")
            .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
            .termsOfServiceUrl("")
            .version(VERSION)
            .contact(new Contact("xiaoyu", "", "[email protected]"))
            .build();
}
 
Example #19
Source Project: steady   Author: eclipse   File: MainController.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Returns the API info for Swagger.
 * @return
 */
private final ApiInfo getApiInfo() {
       return new ApiInfoBuilder()
               .title("Vulas REST API")
               .description("This is the REST API of Vulas")
               .version(VulasConfiguration.getGlobal().getConfiguration().getString("shared.version"))
               .build();
   }
 
Example #20
Source Project: spring-cloud-learning   Author: coderqianlq   File: Swagger2Config.java    License: MIT License 5 votes vote down vote up
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("service-customer")
            .description("Demo project for Spring Boot")
            .termsOfServiceUrl("https://localhostL8200")
            .version("1.0")
            .build();
}
 
Example #21
Source Project: NFVO   Author: openbaton   File: SwaggerConfig.java    License: Apache License 2.0 5 votes vote down vote up
private ApiInfo apiInfo() {
  return new ApiInfoBuilder()
      .title("NFVO REST API")
      .version("3.2.x")
      .description(
          "Below is a detailed description of the REST API of the OpenBaton Network  Function  Virtualization  Orchestrator"
              + "(NFVO).      \n"
              + "To  send  REST  requests  to  the  NFVO  you  first  have  to  get  a  token  which  you  then  have  to  pass  in  the"
              + " header of every request. You can retrieve a token by executing this curl request: \n "
              + "curl -v -u openbatonOSClient:secret -X POST http://localhost:8080/oauth/token -H \"Accept:application/json\" -d \"username=admin&password=openbaton&grant_type=password\"")
      .build();
}
 
Example #22
Source Project: mall-learning   Author: macrozheng   File: Swagger2Config.java    License: Apache License 2.0 5 votes vote down vote up
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("SwaggerUI演示")
            .description("mall-tiny")
            .contact("macro")
            .version("1.0")
            .build();
}
 
Example #23
Source Project: myth   Author: Dromara   File: SwaggerConfig.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Api info api info.
 *
 * @return the api info
 */
ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("Swagger API")
            .description("Myth分布式事务解决方案之SpringCloud测试体验")
            .license("Apache 2.0")
            .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
            .termsOfServiceUrl("")
            .version(VERSION)
            .contact(new Contact("xiaoyu", "", "[email protected]"))
            .build();
}
 
Example #24
Source Project: api-server-seed   Author: imloama   File: Swagger2Config.java    License: Apache License 2.0 5 votes vote down vote up
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("Restful API")
            .description("REST API接口文档")
            .contact(new Contact("imloama","https://github.com/imloama","[email protected]"))
            .version("1.0")
            .build();
}
 
Example #25
Source Project: Java-programming-methodology-Rxjava-articles   Author: muyinchen   File: SwaggerConfig.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * This method will return the API info object to swagger which will in turn
 * display the information on the swagger UI.
 *
 * @return the API information
 */
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title(title)
            .description(description)
            .version(version)
            .build();
}
 
Example #26
Source Project: BigDataPlatform   Author: KangU4   File: Swagger2Config.java    License: GNU General Public License v3.0 5 votes vote down vote up
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("mall后台系统")
            .description("mall后台模块")
            .contact("macro")
            .version("1.0")
            .build();
}
 
Example #27
Source Project: mall   Author: macrozheng   File: Swagger2Config.java    License: Apache License 2.0 5 votes vote down vote up
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("mall前台系统")
            .description("mall前台模块")
            .contact("macro")
            .version("1.0")
            .build();
}
 
Example #28
Source Project: Lottor   Author: keets2012   File: TxManagerConfiguration.java    License: MIT License 5 votes vote down vote up
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("Lottor Server")
            .description("Lottor UI接口描述")
            .termsOfServiceUrl("http://blueskykong.com")
            .version("1.0")
            .build();
}
 
Example #29
Source Project: cxf-spring-cloud-netflix-docker   Author: jonashackt   File: SwaggerConfiguration.java    License: MIT License 5 votes vote down vote up
private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title("Our cool Zuul Edgeservice with dynamic Eureka-registered routes")
            .description("Try it :)")
            .version("0.0.1")
            .build(); 
}
 
Example #30
Source Project: paascloud-master   Author: paascloud   File: SwaggerConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
private ApiInfo apiInfo() {
	SwaggerProperties swagger = paascloudProperties.getSwagger();
	return new ApiInfoBuilder()
			.title(swagger.getTitle())
			.description(swagger.getDescription())
			.version(swagger.getVersion())
			.license(swagger.getLicense())
			.licenseUrl(swagger.getLicenseUrl())
			.contact(new Contact(swagger.getContactName(), swagger.getContactUrl(), swagger.getContactEmail()))
			.build();
}