Skip to content

bravado/swagger-codegen-gradle-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swagger-codegen-gradle-plugin

Build Status

A Gradle plugin to support the swagger code generation project

Usage

see the swagger-codegen-gradle-plugin-example, or:

Add to your build.gradle the following

ext {
    swaggerInputSpec = 'src/main/resources/petstore.yaml'
    swaggerOutput = 'src/swagger'
    swaggerLanguage = 'java'
}

apply plugin: 'org.detoeuf.swagger-code-gen'

sourceSets {
    swagger {
        java.srcDir file('src/swagger/java')
    }
}

Launch with:

gradle swagger

Configuration parameters

  • swaggerInputSpec - swagger spec file path
  • swaggerLanguage - target generation language. Adapt sourceSet accordingly.
  • swaggerTemplateDirectory - directory with mustache templates
  • swaggerApiPackage - package for default API
  • swaggerApiConfig - package for configuration
  • swaggerInvokerPackage - package for invoker
  • swaggerModelPackage - package for models
  • swaggerOutput - target output path (default is ${project.build.directory}/generated-sources/swagger)
  • swaggerLibrary - library template (sub-template) to use

About

A Gradle plugin to support the swagger code generation project

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Groovy 100.0%