Skip to content

Instantly share code, notes, and snippets.

View komiyak's full-sized avatar

Kosuke Komiya komiyak

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