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:
-
Create a new repository in GitHub (Ref: https://help.github.com/articles/creating-a-new-repository/)
-
Generate the SDK
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
- Push the SDK to GitHub
cd /var/tmp/perl/petstore
/bin/sh ./git_push.sh