• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

dave-ellis/gradle-swagger-plugin: A gradle plugin for swagger

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

dave-ellis/gradle-swagger-plugin

开源软件地址(OpenSource Url):

https://github.com/dave-ellis/gradle-swagger-plugin

开源编程语言(OpenSource Language):

Java 89.9%

开源软件介绍(OpenSource Introduction):

gradle-swagger-plugin

This a port of kongchen's maven plugin for generating swagger documents. (See https://github.com/kongchen/swagger-maven-plugin)

Usage

    buildscript {
        repositories {
            mavenLocal()
            maven { url "http://repo.maven.apache.org/maven2" }
        }
        dependencies {
            classpath group: 'com.github.gradle-swagger', name: 'gradle-swagger-plugin', version: '1.0.1-SNAPSHOT'
        }
    }

    apply plugin: 'maven'
    apply plugin: 'swagger'
    apply plugin: 'java'

    swagger {
        endPoints = [
                'com.foo.bar.apis',
                'com.foo.bar.apis.internal.Resource'
        ]
        apiVersion = 'v1'
        basePath = 'http://www.example.com'
        mustacheFileRoot = "${projectDir}/src/main/resources/"
        outputTemplate = "${mustacheFileRoot}/strapdown.html.mustache"
        swaggerDirectory = "${buildDir}/site/api-docs"
        outputPath = "${buildDir}/site/swagger/strapdown.html"
    }
  • The swagger block currently only allows the definition of one apiSource.
  • Java classes containing Swagger's annotation @Api, or Java packages containing those classes can be configured in endPoints list.
  • outputTemplate is the path of the mustache template file.
  • outputPath is the path of your output file, not existed parent directory of the file will be created.
  • If swaggerDirectory is configured, the plugin will also generate a Swagger resource listing suitable for feeding to swagger-ui.
    • useOutputFlatStructure indicates whether swagger output will be created in sub-directories by path defined in @com.wordnik.swagger.annotations.Api#value (false), or the filename will be the path with replaced slashes to underscores (true). Default: true

Continuous Integration

This repository has been integrated with Travis (see https://travis-ci.org/dave-ellis/gradle-swagger-plugin).




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap