Skip to content

Swagger Codegen Workflow Integration

You can use the swagger-codegen-maven-plugin for integrating with your workflow, and generating any codegen target.

Gradle Swagger Generator Plugin is available for generating source code and API document.

To push the auto-generated SDK to GitHub, we provide git_push.sh to streamline the process. For example:

  1. Create a new repository in GitHub (Ref: https://help.github.com/articles/creating-a-new-repository/)

  2. Generate the SDK

Terminal window
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
-i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l perl \
--git-user-id "swaggerapi" \
--git-repo-id "petstore-perl" \
--release-note "Github integration demo" \
-o /var/tmp/perl/petstore
  1. Push the SDK to GitHub
Terminal window
cd /var/tmp/perl/petstore
/bin/sh ./git_push.sh