Skip to content

Instantly share code, notes, and snippets.

Created April 12, 2017 03:11
What would you like to do?
if [ -z "$1" ]; then
echo "usage: preview <swagger.yml path>"
exit 1
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