8

Has anyone made where, where you just enter your swagger URL .../swagger/docs/v1 and then the website converts it to HTML, pdf, doc or whatever in a nice readable format? I'd think that site would get a lot of traffic (hint)

I know there are some things on github you can download that will convert things, but I'd think someone has made a public site so I can save some time.

Dan Parker
  • 823
  • 1
  • 11
  • 27
  • Related: [Generate PDF from Swagger API documentation](https://stackoverflow.com/q/30217910/113116) – Helen Jan 05 '18 at 16:59

2 Answers2

8

You can use this website : Swagger Editor Copy your swagger file and in the menu, select 'Generate Client' -> 'HTML' (or Dynamic HTML')

You can also use Swagger Code Generator if you want to add this step in an automatic build flow.

Nelson G.
  • 5,145
  • 4
  • 43
  • 54
  • 1
    That generate client doesn't look so nice thought – Dan Parker Nov 27 '15 at 18:33
  • 2
    html2 looks just perfect (Generate Client -> html2), further you can just print it to PDF file if you want to make it more friendly in terms of sharing through mails to your API consumers. – Shoaib Khan Jul 05 '17 at 18:59
  • If this ever worked, it doesn't any longer. The console now simply records a `TypeError: NetworkError when attempting to fetch resource.` error. `Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at ...` – Synctrex Jan 08 '20 at 19:38
4

Try this one: swagger2html .

The document generated by swagger-codegen is indeed not readable. This project makes a neat appearance(bootstrap css) and shows the fields in the request/response models in a straightforward manner.

sample image

Jian Chen
  • 586
  • 7
  • 20