This blog will demonstrates steps to generate PDF document
from Swagger UI/JSON data by using third party component (swagger-spec-to-pdf)
Here is swagger API URL
- Download Swagger API JSON file by using swagger document URL ( http://localhost:27860/swagger/docs/v1) and save it locally (OrderAPI.json).
Syntax:
npm install -g swagger-spec-to-pdf
- Open the Command Prompt and run the below command (swagger2pdf ) to generate PDF
- Generates api.pdf file
Generated api.pdf document:
Other swagger related posts
3 comments:
You can always try www.zetpdf.com to sort out this problem.
Hi Rajeev
I've been trying this, but it doesnt seem to be working. I posted an issue on the github account of the npm utility (https://github.com/agreatfool/swagger-spec-to-pdf/issues/16), but also wanted to check if you have any suggestions on what could be the problem?
To export Swagger API documentation to PDF in Swagger UI, navigate to the desired endpoint, click "Export", select "PDF", and save the generated document. I recommend to use ZetPDF . Thanks
Post a Comment