Generate PDF from Swagger API documentation

Aman Mohammed picture Aman Mohammed · May 13, 2015 · Viewed 119k times · Source

I have used the Swagger UI to display my REST webservices and hosted it on a server.

However this service of Swagger can only be accessed on a particular server. If I want to work offline, does anybody know how I can create a static PDF using the Swagger UI and work with it? Additionally a PDF is easy to share with people who don't have access to the server.

Many thanks!

Answer

Osify picture Osify · Dec 21, 2016

Handy way: Using Browser Printing/Preview

  1. Hide editor pane
  2. Print Preview (I used firefox, others also fine)
  3. Change its page setup and print to pdf

enter image description here