Last active
May 13, 2019 09:07
-
-
Save komiyak/6d80611b045894199c5f96d2ffb5a72b to your computer and use it in GitHub Desktop.
Build a html from your OpenAPI Specification (OAS 3.0).
This file contains hidden or 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 | |
# Build the jar file. | |
pushd build/swagger-codegen-$CODEGEN_V/ | |
mvn clean package | |
popd | |
fi | |
# Build a html from OpenAPI Spec. | |
java -jar build/swagger-codegen-$CODEGEN_V/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i openapi.yaml -l html2 -o out/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment