Host Swagger Document Using GitHub Pages

  1. Create a Git repository to host your Swagger document.
  2. Download Swagger UI from 
  3. Extract the distribution and commit contents in \{SWAGGER}.zip\swagger-ui-{VERSION}\dist\* into repository created @ step 1.
  4. (Optional) Add any Swagger document json(e.g. my-sample-swagger.json) created into your repository (this will be the landing Swagger document you want to share with user).
  5. (Optional) Update swagger-initializer.js as below to point to landing Swagger document created @ step 4.
  6. Enable GitHub Pages.
  7. Access your Swagger document @ (you will see landing Swagger document if you setup follow step 4 & 5) else you will see default Swagger sample.
  8. You can start browsing other Swagger document with it’s URL.



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.