Skip to content

Instantly share code, notes, and snippets.

Avatar

komiyak komiyak

View GitHub Profile
@komiyak
komiyak / 2019-05-13.3.sh
Last active May 13, 2019
Build a html from your OpenAPI Specification (OAS 3.0).
View 2019-05-13.3.sh
#!/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
View 2019-05-13.2.sh
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/
View 2019-05-13
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