diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000000..a0e39ffd165 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,47 @@ +*.iml +out/ +*.ipr +*.iws +classpath.txt +version.properties +.project +.classpath +lib/* +build/* +generated-files/* +generated-sources/* +generated-code/* +*.swp +*.swo + +/target +/generated-files +/nbactions.xml +*.pyc +__pycache__ +samples/server-generator/scalatra/output +samples/server-generator/node/output/node_modules +samples/server-generator/scalatra/target +samples/server-generator/scalatra/output/.history +samples/client/petstore/qt5cpp/PetStore/moc_* +samples/client/petstore/qt5cpp/PetStore/*.o +samples/client/petstore/objc/PetstoreClient.xcworkspace/xcuserdata +samples/client/petstore/qt5cpp/build-* +samples/client/petstore/qt5cpp/PetStore/PetStore +samples/client/petstore/qt5cpp/PetStore/Makefile +samples/client/petstore/java/hello.txt +samples/client/petstore/android-java/hello.txt +samples/client/petstore/objc/Build +samples/client/petstore/objc/Pods +samples/server/petstore/nodejs/node_modules +target +.idea +.lib +atlassian-ide-plugin.xml +.DS_Store + +samples/client/petstore/php/SwaggerClient-php/composer.lock +samples/client/petstore/php/SwaggerClient-php/vendor/ + +samples/client/petstore/silex/SwaggerServer/composer.lock +samples/client/petstore/silex/SwaggerServer/venodr/ diff --git a/.gitignore b/.gitignore index 8f160116e5b..b4d421e3c55 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ version.properties lib/* build/* generated-files/* +generated-sources/* generated-code/* *.swp *.swo @@ -30,8 +31,10 @@ samples/client/petstore/qt5cpp/PetStore/PetStore samples/client/petstore/qt5cpp/PetStore/Makefile samples/client/petstore/java/hello.txt samples/client/petstore/android-java/hello.txt -samples/client/petstore/objc/Build -samples/client/petstore/objc/Pods +samples/client/petstore/objc/SwaggerClientTests/Build +samples/client/petstore/objc/SwaggerClientTests/Pods +samples/client/petstore/objc/SwaggerClientTests/SwaggerClient.xcworkspace +samples/client/petstore/objc/SwaggerClientTests/Podfile.lock samples/server/petstore/nodejs/node_modules target .idea @@ -41,3 +44,9 @@ atlassian-ide-plugin.xml samples/client/petstore/php/SwaggerClient-php/composer.lock samples/client/petstore/php/SwaggerClient-php/vendor/ + +samples/client/petstore/silex/SwaggerServer/composer.lock +samples/client/petstore/silex/SwaggerServer/venodr/ + +samples/client/petstore/python/.projectile +samples/client/petstore/python/.venv/ diff --git a/.travis.yml b/.travis.yml index 73c80821ba5..73dc7fdd26d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ sudo: false language: java -script: mvn verify +script: mvn verify -Psamples jdk: - oraclejdk7 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000000..0a3d093290e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM maven:3.3-jdk-7 + +WORKDIR /src +VOLUME /src +VOLUME /root/.m2/repository + +ADD . /opt/swagger-codegen + +RUN cd /opt/swagger-codegen && mvn package + +ENTRYPOINT ["java", "-jar", "/opt/swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"] + +CMD ["help"] diff --git a/README.md b/README.md index a0045247e7a..f288e847b09 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,34 @@ This is the swagger codegen project, which allows generation of client libraries Check out [Swagger-Spec](https://github.com/swagger-api/swagger-spec) for additional information about the Swagger project, including additional libraries with support for other languages and more. +## Build and run using docker + +``` +git clone https://github.com/swagger-api/swagger-codegen + +cd swagger-codegen + +./run-in-docker.sh mvn package + ``` + +Build a nodejs server stub: + + ``` +./run-in-docker.sh generate \ + -i http://petstore.swagger.io/v2/swagger.json \ + -l nodejs \ + -o samples/server/petstore/nodejs + ``` ## Compatibility The Swagger Specification has undergone 3 revisions since initial creation in 2010. The swagger-codegen project has the following compatibilies with the swagger specification: -Swagger Codegen Version | Release Date | Swagger Spec compatibility | Notes ------------------------ | ------------ | -------------------------- | ----- -2.1.2 | 2015-06-09 | 1.0, 1.1, 1.2, 2.0 | [master](https://github.com/swagger-api/swagger-codegen) -2.0.17 | 2014-08-22 | 1.1, 1.2 | [tag v2.0.17](https://github.com/swagger-api/swagger-codegen/tree/v2.0.17) -1.0.4 | 2012-04-12 | 1.0, 1.1 | [tag v1.0.4](https://github.com/swagger-api/swagger-codegen/tree/swagger-codegen_2.9.1-1.1) +Swagger Codegen Version | Release Date | Swagger Spec compatibility | Notes +-------------------------- | ------------ | -------------------------- | ----- +2.1.4-SNAPSHOT | | 1.0, 1.1, 1.2, 2.0 | [master](https://github.com/swagger-api/swagger-codegen) +2.1.3 (**current stable**) | 2015-08-24 | 1.0, 1.1, 1.2, 2.0 | [tag v2.1.3](https://github.com/swagger-api/swagger-codegen/tree/v2.1.3) +2.0.17 | 2014-08-22 | 1.1, 1.2 | [tag v2.0.17](https://github.com/swagger-api/swagger-codegen/tree/v2.0.17) +1.0.4 | 2012-04-12 | 1.0, 1.1 | [tag v1.0.4](https://github.com/swagger-api/swagger-codegen/tree/swagger-codegen_2.9.1-1.1) ### Prerequisites @@ -73,6 +92,7 @@ SYNOPSIS [(-o | --output )] [(-t