View Javadoc
1   package cn.home1.oss.lib.swagger;
2   
3   import springfox.documentation.builders.ApiInfoBuilder;
4   import springfox.documentation.service.ApiInfo;
5   
6   /**
7    * Created by zhanghaolun on 16/11/1.
8    */
9   public abstract class SwaggerUtils {
10  
11    private SwaggerUtils() {
12    }
13  
14    public static ApiInfo apiInfo(final String title, final String description) {
15      return new ApiInfoBuilder()
16        //.contact(new Contact("haolun zhang", "", "haolunzhang@somedomain.com"))
17        .description(description)
18        //.license("Apache License Version 2.0")
19        //.licenseUrl("https://github.com/IBM-Bluemix/news-aggregator/blob/master/LICENSE")
20        //.termsOfServiceUrl("http://www-03.ibm.com/software/sla/sladb.nsf/sla/bm?Open")
21        .title(title)
22        //.version("1.0")
23        .build();
24    }
25  }