我已经开始使用 ReDoc 来发布我的文档,但在将其推送到我的 Web 服务器之前没有一个好的方法来知道它会是什么样子。我过去使用过 http://editor.swagger.io/ 并发现它非常有用。 ReDoc 有类似的东西吗?
是的,如果您使用此项目:https://github.com/Rebilly/generator-openapi-repo#features
您可以使用 swagger 编辑器。 它不会呈现 ReDoc 的预览,但您可以运行本地开发环境并观看浏览器窗口重新加载。 要启动本地开发环境,请参阅此处的说明https://github.com/rebilly/Redoc#development
cd ReDoc
npm install
npm start
或者,只需运行 docker-compose up 即可使用 Docker。