Swagger Editor offline installation

帅比萌擦擦* 提交于 2019-12-06 03:35:30

问题


Our company is using swagger to document their API's, currently a couple of developers are using the online swagger editor on their PC's.

I want to move this piece of the design process into our standard development environment, which is in a walled garden without internet access.

How do I go about installing npm and the swagger editor in an offline environment?

There are options to use either RHEL or Windows machines, although Windows is preferable as developers have local admin rights


回答1:


npm is not required, you can download the compiled files from the Swagger Editor repository:

  • index.html
  • dist\*

and open index.html locally (from the file system) or put the files onto a web server in your network.




回答2:


In short answer is https://swagger.io/docs/swagger-tools/#swagger-editor

git clone https://github.com/swagger-api/swagger-editor.git
cd swagger-editor
npm install
npm run build
npm start

And it will works in your Intranet OK.



来源:https://stackoverflow.com/questions/47164114/swagger-editor-offline-installation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!