什么是YAPI:
高效、易用、功能強大的API管理平台
github: https://github.com/YMFE/yapi 可以去那里下載源代碼,我下載的是 release 1.7.0版本
優勢:提供基本的項目分組,項目管理,接口管理功能;友好的接口文檔,基於websocket的多人協作接口編輯功能和類postman測試工具,讓多人協作成倍提升開發效率;基於Mockjs,使用簡單功能強大
windows開發 YPAI准備工作:
安裝 mingw-get-setup,使windows支持 linux的命令 http://www.mingw.org/wiki/Getting_Started
安裝 mongodb https://www.mongodb.com/download-center/community?jmp=docs
安裝 visual studio code
修改的地方:
多層級修改,分類結構添加 parent_id字段
拖拽修改(目錄拖拽難用,移除)
分類的編輯
列表的分類選擇
修改過后的代碼上傳到github:
https://github.com/herenwei/yapi
調試技巧:
.vscode/launch.json
{ // 使用 IntelliSense 了解相關屬性。 // 懸停以查看現有屬性的描述。 // 欲了解更多信息,請訪問: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "node", "request": "attach", "name": "Node: Nodemon", "processId": "${command:PickProcess}", "restart": true, "protocol": "inspector", } ] }
這樣可以可以附加到進程進行調試
效果圖:



