Skip to content

Instantly share code, notes, and snippets.

@msauza
Created July 27, 2017 18:09
Show Gist options
  • Save msauza/c618460fdae2f58a98c50a7d45b13fd5 to your computer and use it in GitHub Desktop.
Save msauza/c618460fdae2f58a98c50a7d45b13fd5 to your computer and use it in GitHub Desktop.
Swagger UI on Docker - Export swagger.json to static HTML
### Run Swagger UI on Docker
docker run -p 9000:8080 -e "VALIDATOR_URL=null" swaggerapi/swagger-ui
### Install bootprint-openapi
### https://github.com/bootprint/bootprint-openapi
npm install -g bootprint
npm install -g bootprint-openapi
### Generate static files (html, css, js)
bootprint openapi URL_OR_FILE_TO.JSON targetDir
### Create single file
npm -g install html-inline
html-inline targetDir/index.html
### Add to ~\npm\node_modules\bootprint\bin\bootprint.js
### Ignore self signed certificate
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment