Created
June 28, 2018 12:07
-
-
Save AlexanderRD/2402e390908a268bc877d8903bbcce1c to your computer and use it in GitHub Desktop.
Export Grape API docs to single html file using Swagger and Bootprint
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
# Ensure swagger docs have been generated for your app, | |
# by weirdly running your app locally and navigating to route | |
# that matches whwere the docs are mounted | |
rails s -p 3001 | |
# Install bootprint | |
npm install -g bootprint | |
npm install -g bootprint-openapi | |
# Use Bootprint to generate docs from the default swagger docs location | |
bootprint openapi http://petstore.swagger.io/v2/swagger.json TARGET_DIR | |
# Combine files into a single file | |
npm -g install html-inline | |
html-inline TARGET_DIR/index.html > OUTPUT.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment