Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate PDF from Swagger API documentation

Tags:

pdf

swagger-ui

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!

like image 342
Aman Mohammed Avatar asked May 13 '15 14:05

Aman Mohammed


People also ask

Can we download Swagger documentation?

You can download it from the left Navigation tree. For example, to download and copy the Swagger file for the REST API for Documents: On docs.oracle.com , open the REST API document at REST API for Documents.


1 Answers

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

like image 160
Osify Avatar answered Sep 25 '22 03:09

Osify