This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CODEGEN_V='3.0.8' | |
if [ ! -d ./build/swagger-codegen-$CODEGEN_V/ ]; then | |
rm -rf build/ | |
mkdir -p build/ | |
wget -qO- https://github.com/swagger-api/swagger-codegen/archive/v$CODEGEN_V.tar.gz | tar zxvf - -C ./build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -jar build/swagger-codegen-3.0.8/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar \ | |
generate -i petstore.yaml -l html2 -o out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd your-project/ | |
mkdir -p build/ | |
wget -qO- https://github.com/swagger-api/swagger-codegen/archive/v3.0.8.tar.gz | tar zxvf - -C ./build | |
cd build/swagger-codegen-3.0.8/ | |
mvn clean package | |
# 下記の jar が作られたら成功です | |
# ./build/swagger-codegen-3.0.8/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar |