This is a quick guide on executing the new javascript generator in swagger 2.1.6
Go to a tmp directory
cd `mktemp -d /tmp/swagger-codegen-XXXXXX`;
Download swagger codegen 2.1.6 jar
wget http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.1.6/swagger-codegen-cli-2.1.6.jar -O swagger-codegen-cli.jar;
Set a variable for your swagger spec path/url.
SPEC=http://petstore.swagger.io/v2/swagger.json;
Execute swagger codegen, and place the results in the ./output folder
java -jar swagger-codegen-cli.jar generate -l javascript -i $SPEC -o output;
View the results
tree output;
Resulting output
output
├── docs
│ ├── ApiResponse.md
│ ├── Category.md
│ ├── Order.md
│ ├── PetApi.md
│ ├── Pet.md
│ ├── StoreApi.md
│ ├── Tag.md
│ ├── UserApi.md
│ └── User.md
├── git_push.sh
├── package.json
├── README.md
└── src
├── api
│ ├── PetApi.js
│ ├── StoreApi.js
│ └── UserApi.js
├── ApiClient.js
├── index.js
└── model
├── ApiResponse.js
├── Category.js
├── Order.js
├── Pet.js
├── Tag.js
└── User.js