Java Code Examples for springfox.documentation.spi.DocumentationType

The following are top voted examples for showing how to use springfox.documentation.spi.DocumentationType. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to product more good examples.

Example 1
Project: Learny---Server   File: SwaggerConfig.java View source code 6 votes
@Beanpublic Docket learnyApi() {return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select().apis(RequestHandlerSelectors.withClassAnnotation(Api.class)).paths(PathSelectors.any()).build().pathMapping("/").directModelSubstitute(LocalDate.class,String.class).genericModelSubstitutes(ResponseEntity.class).useDefaultResponseMessages(false).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext()));}
Example 2
Project: jhipster_myapp   File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket() {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();Docket swaggerSpringMvcPlugin = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)) // and by paths.build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return swaggerSpringMvcPlugin;}

Example 3
Project: jhipster-sample-app-gradle   File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();ApiInfo apiInfo = new ApiInfo(
jHipsterProperties.getSwagger().getTitle(),
jHipsterProperties.getSwagger().getDescription(),
jHipsterProperties.getSwagger().getVersion(),
jHipsterProperties.getSwagger().getTermsOfServiceUrl(),
jHipsterProperties.getSwagger().getContact(),
jHipsterProperties.getSwagger().getLicense(),
jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 4
Project: menuber   File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket() {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 5
Project: jhipster-sample-app-java7   File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();ApiInfo apiInfo = new ApiInfo(
jHipsterProperties.getSwagger().getTitle(),
jHipsterProperties.getSwagger().getDescription(),
jHipsterProperties.getSwagger().getVersion(),
jHipsterProperties.getSwagger().getTermsOfServiceUrl(),
jHipsterProperties.getSwagger().getContact(),
jHipsterProperties.getSwagger().getLicense(),
jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 6
Project: bugkillers   File: SpringfoxConfig2.java View source code 6 votes
@Beanpublic Docket swaggerSpringMvcPlugin() {//        return new Docket(DocumentationType.SWAGGER_2);return new Docket(DocumentationType.SWAGGER_2)//                .groupName("bugkillers").select()//Ignores controllers annotated with @CustomIgnore//                .apis(not(withClassAnnotation(CustomIgnore.class)) //Selection by RequestHandler.paths(paths()) // and by paths.build().apiInfo(apiInfo()).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext()));}
Example 7
Project: springfox-demos   File: Application.java View source code 6 votes
@Beanpublic Docket petApi() {return new Docket(DocumentationType.SWAGGER_2).groupName("full-petstore-api").apiInfo(apiInfo()).select().paths(petstorePaths()).build();}
Example 8
Project: flipper-reverse-image-search   File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket() {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 9
Project: jhipster-ionic   File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket() {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 10
Project: barweb   File: ApiDocumentationConfig.java View source code 6 votes
@Beanpublic Docket petApi() {return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any()).paths(PathSelectors.any()).build().pathMapping("/api").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).globalResponseMessage(RequestMethod.GET, newArrayList(new ResponseMessageBuilder().code(500).message("500 message").responseModel(new ModelRef("Error")).build())).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext()));}
Example 11
Project: jhipster-sample-app   File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();ApiInfo apiInfo = new ApiInfo(
jHipsterProperties.getSwagger().getTitle(),
jHipsterProperties.getSwagger().getDescription(),
jHipsterProperties.getSwagger().getVersion(),
jHipsterProperties.getSwagger().getTermsOfServiceUrl(),
jHipsterProperties.getSwagger().getContact(),
jHipsterProperties.getSwagger().getLicense(),
jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 12
Project: availability   File: SwaggerConfig.java View source code 6 votes
@Beanpublic Docket api() {return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any()).paths(PathSelectors.any()).build().pathMapping("/").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).globalResponseMessage(RequestMethod.GET,
newArrayList(new ResponseMessageBuilder().code(500).message("500 message").responseModel(new ModelRef("Error")).build())).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext())).enableUrlTemplating(true);}
Example 13
Project: jhipster-sample-app-mongodb   File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();ApiInfo apiInfo = new ApiInfo(
jHipsterProperties.getSwagger().getTitle(),
jHipsterProperties.getSwagger().getDescription(),
jHipsterProperties.getSwagger().getVersion(),
jHipsterProperties.getSwagger().getTermsOfServiceUrl(),
jHipsterProperties.getSwagger().getContact(),
jHipsterProperties.getSwagger().getLicense(),
jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 14
Project: spring-swagger2markup-demo   File: SwaggerConfig.java View source code 6 votes
@Beanpublic Docket restApi() {return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select().paths(Predicates.and(ant("/**"), Predicates.not(ant("/error")))).build();}
Example 15
Project: cqrs-axon   File: Swagger2Configuration.java View source code 6 votes
@Beanpublic Docket petApi() {return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any()).paths(PathSelectors.any()).build().pathMapping("/").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).globalResponseMessage(RequestMethod.GET,
newArrayList(new ResponseMessageBuilder().code(500).message("500 message").responseModel(new ModelRef("Error")).build())).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext())).enableUrlTemplating(true);}
Example 16
Project: fullstop   File: SwaggerConfig.java View source code 6 votes
@Beanpublic Docket customImplementation() {return new Docket(DocumentationType.SWAGGER_2) //.apiInfo(apiInfo())                    //.select()                              //.paths(fullstopOnlyEndpoints())        //.build();}
Example 17
Project: jhipster-sample-app-elasticsearch   File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();ApiInfo apiInfo = new ApiInfo(
jHipsterProperties.getSwagger().getTitle(),
jHipsterProperties.getSwagger().getDescription(),
jHipsterProperties.getSwagger().getVersion(),
jHipsterProperties.getSwagger().getTermsOfServiceUrl(),
jHipsterProperties.getSwagger().getContact(),
jHipsterProperties.getSwagger().getLicense(),
jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 18
Project: JTL-FIleService   File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket() {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 19
Project: ABC-Go   File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket() {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}

springfox.documentation.spi.DocumentationType配置示例的更多相关文章

  1. springfox.documentation.service.ApiInfo配置示例

    Java Code Examples for springfox.documentation.service.ApiInfo The following are top voted examples ...

  2. Nginx 简单的负载均衡配置示例(转载)

    原文地址:Nginx 简单的负载均衡配置示例(转载) 作者:水中游于 www.s135.com 和 blog.s135.com 域名均指向 Nginx 所在的服务器IP. 用户访问http://www ...

  3. HBase + Kerberos 配置示例(二)

    接上篇<HBase + Kerberos配置示例(一)>,我们继续剩下的配置工作. 环境准备 Hadoop配置 Zookeeper配置 HBase配置 Java测试程序 环境准备 安装ha ...

  4. 高通APQ8074 spi 接口配置

    高通APQ8074 spi 接口配置 8074 平台含有两个BLSP(BAM Low-Speed Peripheral) , 每一个BLSP含有两个QUP, 每一个QUP可以被配置为I2C, SPI, ...

  5. 全互联结构DVPN综合配置示例

    以下内容摘自正在全面热销的最新网络设备图书“豪华四件套”之一<H3C路由器配置与管理完全手册>(第二版)(其余三本分别是:<Cisco交换机配置与管理完全手册>(第二版).&l ...

  6. Haproxy的安装和配置示例

    1.ha proxy简介ha proxy是一个开源的,高性能的,基于tcp第四层和http第七层应用的负载均衡软件优点:可靠性和稳定性非常好          最高可以同时维护40000-50000个 ...

  7. MyBatis Generator配置示例

    (一).MBG介绍 MyBatis Generator(MBG)是一个Mybatis的代码生成器,它可以用来生成可以访问(多个)表的基础对象.MBG解决了对数据库操作有最大影响的一些简单的CRUD(插 ...

  8. haproxy反向代理配置示例

    */ .hljs { display: block; overflow-x: auto; padding: 0.5em; color: #333; background: #f8f8f8; } .hl ...

  9. java日志规约及配置示例终极总结

    目录 什么是日志 常用日志框架 日志级别详解 日志的记录时机 日志使用规约 logback 配置示例 loh4j2 配置示例 什么是日志? 简单的说,日志就是记录程序的运行轨迹,方便查找关键信息,也方 ...

随机推荐

  1. scanf与scanf_s的区别

    scanf()函数是标准C中提供的标准输入函数,用以用户输入数据 scanf_s()函数是Microsoft公司VS开发工具提供的一个功能相同的安全标准输入函数,从vc++2005开始,VS系统提供了 ...

  2. Canvas 画布小案例

    <script> window.onload = function () { draw('canvas1'); draw('canvas2'); draw('canvas3'); draw ...

  3. 用Gen8服务器来学习虚拟化ESXI

    虚拟化和云计算是这几年的热门技术,VMware公司是虚拟化的领头羊,小坦克我有幸在VMware从事这方面的测试工作. 本系列将会讲述我学习虚拟化的一些经历. 将会覆盖一些虚拟化产品: 比如:VMwar ...

  4. 动态SQL基础

    动态SQL就是我们可以动态构造SQL代码,然后再执行这个批处理.有两种执行动态SQL的方法,分别是EXEC命令和sp_executesql存储过程.下面是示例代码. USE TSQLFundament ...

  5. Oracle权限管理详解

    Oracle权限管理详解 转载--CzmMiao的博客生活 Oracle 权限 权限允许用户访问属于其它用户的对象或执行程序,ORACLE系统提供三种权限:Object 对象级.System 系统级. ...

  6. 1362. Classmates 2

    http://acm.timus.ru/problem.aspx?space=1&num=1362 水题,树形DP 代码: #include<iostream> #include& ...

  7. JavaScript Array对象 知识点总结

    1 isArray方法 该方法是Array对象的静态方法,用来判断一个值是否为数组,它可以弥补typeof运算符的不足. 用法是Array.isArray(array实例) 通用的判断对象数据类型的方 ...

  8. Javascript实现CheckBox的全选与取消全选的代码(转)

    js函数 复制代码 代码如下: <script type="text/javascript"> function checkAll(name) { var el = d ...

  9. Hadoop学习资料

    转自:http://cloud21.iteye.com/blog/607175 第一手资源 hadoop官方网站 hadoop.apache.org 最权威的官方资源之一 dev.yahoo.hado ...

  10. EC6 map 和 set

    1.map 首先map是一个具有键值对的结构 给定一个名字,要查找对应的成绩,就先要在names中找到对应的位置,再从scores取出对应的成绩,Array越长,耗时越长. 如果用Map实现,只需要一 ...