从 Swagger API 文档生成 PDF [英] Generate PDF from Swagger API documentation

查看:72
本文介绍了从 Swagger API 文档生成 PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Swagger UI 来显示我的 REST 网络服务并将其托管在服务器上.

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

然而,Swagger 的这项服务只能在特定的服务器上访问.如果我想离线工作,有人知道如何使用 Swagger UI 创建静态 PDF 并使用它吗?此外,PDF 很容易与无法访问服务器的人共享.

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.

非常感谢!

推荐答案

我想出了一个方法,使用 https://github.com/springfox/springfoxhttps://github.com/RobWin/swagger2markup

I figured out a way using https://github.com/springfox/springfox and https://github.com/RobWin/swagger2markup

使用 Swagger 2 来实现文档.

Used Swagger 2 to implement documentation.

这篇关于从 Swagger API 文档生成 PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆