Created
April 12, 2017 03:11
-
-
Save ToQoz/cfb3b3c4cdd026c4f196bd908c6c7df6 to your computer and use it in GitHub Desktop.
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/sh | |
if [ -z "$1" ]; then | |
echo "usage: preview <swagger.yml path>" | |
exit 1 | |
fi | |
tmpdir=$(mktemp -d /tmp/swagger-mode-tmp.XXXXXXXXXX) | |
swagger-codegen generate -i $1 -l html2 -o $tmpdir | |
open $tmpdir/index.html | |
sleep 3 | |
rm -rf $tmpdir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment