swagger-editor 快速REST-API 測試文檔編寫


1. 在線使用

 http://editor.swagger.io/#/

2. 離線工具

 https://github.com/swagger-api/swagger-editor

3. 跨域訪問問題:

  服務添加一下 http 響應頭(不同服務器配置可能不同,可以搜索對應的資料):

Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept

 4. docker 安裝

docker pull swaggerapi/swagger-editor
docker run -p 80:8080 swaggerapi/swagger-editor


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM