本文整理汇总了Java中springfox.documentation.service.ApiInfo类的典型用法代码示例。如果您正苦于以下问题:Java ApiInfo类的具体用法?Java ApiInfo怎么用?Java ApiInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ApiInfo类属于springfox.documentation.service包,在下文中一共展示了ApiInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: apiInfo
import springfox.documentation.service.ApiInfo; //导入依赖的package包/类
private ApiInfo apiInfo(Swagger2Properties swagger2Properties) {
return new ApiInfoBuilder()
.title(swagger2Properties.getApiInfo().getTitle())
.description(swagger2Properties.getApiInfo().getDescription())
.termsOfServiceUrl(swagger2Properties.getApiInfo().getTermsOfServiceUrl())
.contact(
new Contact(
swagger2Properties.getApiInfo().getContact().getName(),
swagger2Properties.getApiInfo().getContact().getUrl(),
swagger2Properties.getApiInfo().getContact().getEmail()
)
)
.license(swagger2Properties.getApiInfo().getLicense())
.licenseUrl(swagger2Properties.getApiInfo().getLicenseUrl())
.version(swagger2Properties.getApiInfo().getVersion())
.build();
}
示例2: apiInfo
import springfox.documentation.service.ApiInfo; //导入依赖的package包/类
private ApiInfo apiInfo() {
Contact contact = new Contact("sdcuike", "https://github.com/sdcuike", "[email protected]");
return new ApiInfoBuilder()
.title("spring boot practice API")
.description("练习spring-boot")
.termsOfServiceUrl("https://github.com/sdcuike/spring-boot-practice")
.contact(contact)
.license("Apache License Version 2.0")
.licenseUrl("https://www.apache.org/licenses/LICENSE-2.0")
.version("1.0.0")
.build();
}
示例3: toApiInfo
import springfox.documentation.service.ApiInfo; //导入依赖的package包/类
private ApiInfo toApiInfo(SwaggerProperties properties) {
String version = Optional.ofNullable(this.getClass())
.map(Class::getPackage)
.map(Package::getImplementationVersion)
.orElse(properties.getVersion());
return new ApiInfo(
properties.getTitle(),
properties.getDescription(),
version,
properties.getTermsOfServiceUrl(),
contact(properties),
properties.getLicense(),
properties.getLicenseUrl()
//,Collections.emptyList()
);
}
示例4: getApiInfo
import springfox.documentation.service.ApiInfo; //导入依赖的package包/类
private ApiInfo getApiInfo() {
return new ApiInfoBuilder()
.title(title)
.version(version)
.build();
}
示例5: apiInfo
import springfox.documentation.service.ApiInfo; //导入依赖的package包/类
ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("Swagger API")
.description("transaction-admin 平台接口测试")
.license("Apache 2.0")
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
.termsOfServiceUrl("")
.version(VERSION)
.contact(new Contact("xiaoyu", "", "[email protected]"))
.build();
}
示例6: apiInfo
import springfox.documentation.service.ApiInfo; //导入依赖的package包/类
ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("Swagger API")
.description("dubbo分布式事务解决方案之二阶段提交测试体验")
.license("Apache 2.0")
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
.termsOfServiceUrl("")
.version(VERSION)
.contact(new Contact("xiaoyu", "", "[email protected]"))
.build();
}
示例7: apiInfo
import springfox.documentation.service.ApiInfo; //导入依赖的package包/类
private ApiInfo apiInfo() {
// @formatter:off
return new ApiInfoBuilder()
.title(title)
.description(description)
.termsOfServiceUrl(termsOfServiceUrl)
.contact(new Contact(contactName, contactUrl, contactEmail))
.version(version)
.build();
// @formatter:on
}
示例8: apiInfo
import springfox.documentation.service.ApiInfo; //导入依赖的package包/类
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title(title)
.description(description)
.license(LICENSE_TEXT)
.version(SWAGGER_API_VERSION)
.build();
}
示例9: apiInfo
import springfox.documentation.service.ApiInfo; //导入依赖的package包/类
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("Spring Boot中使用Swagger2构建RESTful APIs")
.description("详细描述参照源码 https://github.com/514840279/danyuan-application")
.termsOfServiceUrl("http://danyuan.wang")
.contact("")
.version("1.0")
.build();
}
示例10: metaData
import springfox.documentation.service.ApiInfo; //导入依赖的package包/类
/**
* Set api info.
*
* @return Api info
*/
private ApiInfo metaData() {
return new ApiInfoBuilder()
.title("REST API")
.description("Spring Boot REST API")
.contact(new Contact("JonkiPro",
"https://github.com/JonkiPro",
"[email protected]"))
.license("MIT")
.licenseUrl("https://github.com/JonkiPro/REST-Web-Services/blob/master/LICENSE")
.version("1.0")
.build();
}
示例11: apiInfo
import springfox.documentation.service.ApiInfo; //导入依赖的package包/类
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("Web QQ API")
.description("Web QQ API Swagger")
.contact("[email protected]")
.version("1.0.0")
.build();
}
示例12: apiInfo
import springfox.documentation.service.ApiInfo; //导入依赖的package包/类
private ApiInfo apiInfo() {
Contact contact=new Contact("Binux",
"http://git.oschina.net/binu/xbin-store","[email protected]");
return new ApiInfoBuilder()
.title(title + " RESTful APIs")
.description(title + " RESTful API详情!")
.contact(contact)
.version("1.0")
.build();
}
示例13: apiInfo
import springfox.documentation.service.ApiInfo; //导入依赖的package包/类
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("API")
.description("Some description")
.version("1.0")
.build();
}
示例14: apiInfo
import springfox.documentation.service.ApiInfo; //导入依赖的package包/类
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title(properties.get("title"))
.description(properties.get("description"))
.license(properties.get("license"))
.licenseUrl(properties.get("licenseUrl"))
.contact(new Contact(contact.get("name"), contact.get("url"), contact.get("email")))
.version(properties.get("version"))
.build();
}
示例15: metaInfo
import springfox.documentation.service.ApiInfo; //导入依赖的package包/类
private ApiInfo metaInfo() {
ApiInfo apiInfo = new ApiInfo(
"Spring 5 RESTful Project Example", // title
"Documentation of Project REST API", // sub-title
"1.0", // api version
"Terms of service..bla..bla", // term of service
new Contact("Maikel Chandika", "http://blog.mkdika.com/about/", "[email protected]"), // author
"License of API is MIT", // License Type
"https://github.com/mkdika/spring5-rest-api/blob/master/LICENSE");
return apiInfo;
}