/** * 配置默认的全局鉴权策略;其中返回的 SecurityReference 中,reference 即为ApiKey对象里面的name,保持一致才能开启全局鉴权 * * @return */ private List<SecurityReference> defaultAuth() { AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; authorizationScopes[0] = authorizationScope; return Collections.singletonList(SecurityReference.builder() .reference(swaggerProperties().getAuthorization().getName()) .scopes(authorizationScopes).build()); }
private ApiInfo buildApiInf() { return new ApiInfoBuilder() .title("系统RESTful API文档") .contact(new Contact("mrbird", "https://mrbird.cc", "852252810@qq.com")) .version("1.0") .build(); } }
@Bean public Docket configure(SwaggerApiInfo info, TypeResolver typeResolver) { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.github.prontera")) .paths(PathSelectors.any()) .build() .pathMapping("/") .useDefaultResponseMessages(false) .globalResponseMessage(RequestMethod.OPTIONS, info.getStatusList()) .apiInfo(new ApiInfo(info.getTitle(), DESCRIPTION, info.getVersion(), info.getServiceUrl(), new Contact(null, null, null), null, null)) .alternateTypeRules( AlternateTypeRules.newRule( typeResolver.resolve(PageInfo.class, WildcardType.class), typeResolver.resolve(SwaggerPaginationResponse.class, WildcardType.class)), AlternateTypeRules.newRule( typeResolver.resolve(Collection.class, WildcardType.class), typeResolver.resolve(List.class, WildcardType.class)) ) //.enableUrlTemplating(true) .forCodeGeneration(false); }
/** * 配置基于 ApiKey 的鉴权对象 * * @return */ private ApiKey apiKey() { return new ApiKey(swaggerProperties().getAuthorization().getName(), swaggerProperties().getAuthorization().getKeyName(), ApiKeyVehicle.HEADER.getValue()); }
private ApiInfo apiInfo() { return new ApiInfoBuilder() .title("XPay Api Documentation") .description("XPay个人支付收款系统API接口文档") .termsOfServiceUrl("http://xpay.exrick.cn/") .contact(new Contact("Exrick", "http://blog.exrick.cn", "1012139570@qq.com")) .version("1.0.0") .build(); } }
private ApiInfo apiInfo() { return new ApiInfoBuilder()// .title("龙果学院")// 标题 .description("spring boot 全集")// 描述 .termsOfServiceUrl("http://www.roncoo.com")// .contact(new Contact("wujing", "http://www.roncoo.com", "297115770@qq.com"))// 联系 //.license("Apache License Version 2.0")// 开源协议 //.licenseUrl("https://github.com/springfox/springfox/blob/master/LICENSE")// 地址 .version("1.0")// 版本 .build(); } }
private ApiInfo apiInfo() { return new ApiInfoBuilder() .title("Swagger API") .description("hmily-admin 平台接口测试") .license("Apache 2.0") .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version(VERSION) .contact(new Contact("xiaoyu", "", "549477611@qq.com")) .build(); }
ApiInfo apiInfo() { return new ApiInfoBuilder() .title("Swagger API") .description("Springcloud分布式事务解决方案之Hmily测试体验") .license("Apache 2.0") .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version(VERSION) .contact(new Contact("xiaoyu", "", "549477611@qq.com")) .build(); }
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", "", "549477611@qq.com")) .build(); }
private ApiInfo apiInfo() { return new ApiInfoBuilder() .title("Swagger API") .description("myth-admin 平台接口测试") .license("Apache 2.0") .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version(VERSION) .contact(new Contact("xiaoyu", "", "549477611@qq.com")) .build(); }
/** * Api info api info. * * @return the api info */ private ApiInfo apiInfo() { return new ApiInfoBuilder() .title("Swagger API") .description("dubbo分布式事务解决方案之Hmily测试体验") .license("Apache 2.0") .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version(VERSION) .contact(new Contact("xiaoyu", "", "549477611@qq.com")) .build(); }
/** * 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", "", "549477611@qq.com")) .build(); }
/** * Api info api info. * * @return the api info */ ApiInfo apiInfo() { return new ApiInfoBuilder() .title("Swagger API") .description("dubbo,mq分布式事务解决方案 测试体验") .license("Apache 2.0") .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version(VERSION) .contact(new Contact("xiaoyu", "", "549477611@qq.com")) .build(); }
/** * Api info api info. * * @return the api info */ 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", "", "549477611@qq.com")) .build(); }
/** * Api info api info. * * @return the api info */ ApiInfo apiInfo() { return new ApiInfoBuilder() .title("Swagger API") .description("springcloud分布式事务解决方案之二阶段提交测试体验") .license("Apache 2.0") .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version(VERSION) .contact(new Contact("xiaoyu", "", "549477611@qq.com")) .build(); }
/** * Api info api info. * * @return the api info */ ApiInfo apiInfo() { return new ApiInfoBuilder() .title("Swagger API") .description("Springcloud,MQ分布式事务解决方案测试体验") .license("Apache 2.0") .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version(VERSION) .contact(new Contact("xiaoyu", "", "549477611@qq.com")) .build(); }
private ApiInfo apiInfo() { return new ApiInfoBuilder() .title(title) .description(description) .termsOfServiceUrl(termsOfServiceUrl) .contact(new Contact(name, url, email)) .version(version) .build(); } }
private ApiInfo apiInfo() { return new ApiInfoBuilder() .title(serviceName) .description(description) .version(version) .license(license) .licenseUrl(licenseUrl) .contact(new Contact(contactName, contactUrl, contactEmail)) .termsOfServiceUrl(termsOfServiceUrl) .build(); }
private ApiInfo apiInfo() { return new ApiInfoBuilder() .title(serviceName) .description(description) .version(version) .license(license) .licenseUrl(licenseUrl) .contact(new Contact(contactName, contactUrl, contactEmail)) .termsOfServiceUrl(termsOfServiceUrl) .build(); }
.license(swaggerProperties.getLicense()) .licenseUrl(swaggerProperties.getLicenseUrl()) .contact(new Contact(swaggerProperties.getContact().getName(), swaggerProperties.getContact().getUrl(), swaggerProperties.getContact().getEmail())) .licenseUrl(docketInfo.getLicenseUrl().isEmpty() ? swaggerProperties.getLicenseUrl() : docketInfo.getLicenseUrl()) .contact( new Contact( docketInfo.getContact().getName().isEmpty() ? swaggerProperties.getContact().getName() : docketInfo.getContact().getName(), docketInfo.getContact().getUrl().isEmpty() ? swaggerProperties.getContact().getUrl() : docketInfo.getContact().getUrl(),