@Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .useDefaultResponseMessages(false) .globalResponseMessage(RequestMethod.GET, getDefaultResponseMessage()) .globalResponseMessage(RequestMethod.POST, getDefaultResponseMessage()) .globalResponseMessage(RequestMethod.PUT, getDefaultResponseMessage()) .globalResponseMessage(RequestMethod.DELETE, getDefaultResponseMessage()) .directModelSubstitute(Timestamp.class, Date.class) .tags(new Tag("默认标签", "定义全局默认标签"),getTags()) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage("com.plumdo.form")) .paths(PathSelectors.any()) .build(); }
@Bean public Docket practiceApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage("com.sdcuike.practice")) .paths(PathSelectors.any()) .build() .pathMapping("/") .genericModelSubstitutes(ResponseEntity.class) .alternateTypeRules( newRule(typeResolver.resolve(DeferredResult.class, typeResolver.resolve(ResponseEntity.class, WildcardType.class)), typeResolver.resolve(WildcardType.class))) .useDefaultResponseMessages(false) .globalResponseMessage(RequestMethod.GET, newArrayList(new ResponseMessageBuilder() .code(500) .message("500 message") .responseModel(new ModelRef("Error")) .build())) .enableUrlTemplating(true) .tags(new Tag("Pet Service", "All apis relating to pets")); }
public Docket api() { return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.any()) .build() .pathMapping("/") .directModelSubstitute(LocalDate.class, String.class) .genericModelSubstitutes(ResponseEntity.class) .alternateTypeRules(AlternateTypeRules.newRule(typeResolver.resolve( DeferredResult.class, typeResolver.resolve(ResponseEntity.class, WildcardType.class)), typeResolver.resolve( WildcardType.class))) .useDefaultResponseMessages(false); }
@Bean public Docket customImplementation() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("io.pestakit.email.api")) .build() .directModelSubstitute(org.joda.time.LocalDate.class, java.sql.Date.class) .directModelSubstitute(org.joda.time.DateTime.class, java.util.Date.class) .apiInfo(apiInfo()); }
@Bean public Docket customImplementation() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("io.swagger.api")) .build() .directModelSubstitute(org.joda.time.LocalDate.class, java.sql.Date.class) .directModelSubstitute(org.joda.time.DateTime.class, java.util.Date.class) .apiInfo(apiInfo()); }
@Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage("com.crossoverJie.sbcorder.controller")) .paths(PathSelectors.any()) .build(); }
@Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2).select() .apis(RequestHandlerSelectors.basePackage("com.borabeber.api.controllers")) .paths(PathSelectors.any()).build() .apiInfo(apiInfo()); }
@Bean public Docket customImplementation(){ return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("io.swagger.api")) .build() .directModelSubstitute(org.joda.time.LocalDate.class, java.sql.Date.class) .directModelSubstitute(org.joda.time.DateTime.class, java.util.Date.class) .apiInfo(apiInfo()); }
@Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.any()) .build(); }
@Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .groupName("Template") .select() .apis(RequestHandlerSelectors.basePackage(TemplateApplication.class.getPackage().getName())) .paths(PathSelectors.any()) .build() .apiInfo(getApiInfo()); }
/** * Configure Spring Fox. * * @return The spring fox docket. */ @Bean public Docket productApi() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.web.web.controller")) .paths(any()) .build() .apiInfo(metaData()); }
@Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.bbva.arq.devops.ae.mirrorgate.api")) .paths(PathSelectors.any()) .build(); }
@Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage(this.basePackage)) .paths(PathSelectors.any()).build(); }
@Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage(ClaimStoreApplication.BASE_PACKAGE_NAME + ".controllers")) .paths(PathSelectors.any()) .build(); }
@Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage(basePackage)) .paths(PathSelectors.any()) .build(); }
/** * Create rest api docket. * * @return the docket */ @Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) //.groupName("用户管理") .forCodeGeneration(true) .select() .apis(RequestHandlerSelectors.basePackage("com.lovecws.mumu.swagger")) .paths(PathSelectors.any()) .build(); }
@Bean public Docket models() { return new Docket(DocumentationType.SWAGGER_2) .groupName("models") .select() .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.regex("/model-.+")) .build() .apiInfo(apiInfo()); }
@Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage("cn.mailu.lushx")) .paths(PathSelectors.any()) .build(); }
@Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage("com.eastrobot.web")) .paths(PathSelectors.any()) .build(); }
@Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.any()) .build(); // /swagger-ui.html }
@Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .useDefaultResponseMessages(false) .select() .apis(RequestHandlerSelectors.basePackage(Application.class.getPackage().getName() + ".controllers")) .paths(PathSelectors.any()) .build(); }
@Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage("org.prcode.web")) .paths(PathSelectors.any()) .build(); }
@Bean public Docket customImplementation() { return new Docket(DocumentationType.SWAGGER_2).select() .apis(RequestHandlerSelectors.basePackage("com.wei.you.zhihu.spider.controller")).build() .directModelSubstitute(org.joda.time.LocalDate.class, java.sql.Date.class) .directModelSubstitute(org.joda.time.DateTime.class, java.util.Date.class).apiInfo(apiInfo()); }
/** * Creates for the dynamic documentation necessary REST API Docket. * @param typeResolver The type resolver. Must not be <code>null</code>. * @return The requested REST API Docket. */ public static Docket createIndoorRestApiDocket(TypeResolver typeResolver) { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.any()) .paths(Predicates.not(PathSelectors.regex(EXCLUDE_ERROR_PATH_REGEX))) .build() .pathMapping(ROOT_PATH) .directModelSubstitute(LocalDate.class, String.class) .genericModelSubstitutes(ResponseEntity.class) .alternateTypeRules( newRule(typeResolver.resolve(DeferredResult.class, typeResolver.resolve(ResponseEntity.class, WildcardType.class)), typeResolver.resolve(WildcardType.class))) .useDefaultResponseMessages(false) .enableUrlTemplating(false) .tags(new Tag(TAG_NAME, TAG_DESCRIPTION)).apiInfo(apiInfo()); }
@Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage("vip.fanrong")) .paths(PathSelectors.any()) .build(); }
@Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.any()) .build() .apiInfo(apiInfo()) .useDefaultResponseMessages(false) ; }
@Bean public Docket customImplementation(){ return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("io.openaffect.api")) .build() .directModelSubstitute(org.joda.time.LocalDate.class, java.sql.Date.class) .directModelSubstitute(org.joda.time.DateTime.class, java.util.Date.class) .apiInfo(apiInfo()); }
@Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .useDefaultResponseMessages(false) .select() .apis(RequestHandlerSelectors.any()) .paths(Predicates.not(PathSelectors.regex("/error.*"))) .build(); }
@Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage(PDFServiceApplication.BASE_PACKAGE_NAME + ".endpoint")) .paths(PathSelectors.any()) .build(); }