好用的yapi接口文檔自動生成插件idea-yapi

idea-yapi是idea下一個好用的插件,只須要選中controller類上的函數名,而後右鍵菜單中選擇「idea-yapi」就行了。web

 

在idea中配置(注意,web、core都是我工程裏的代碼模塊名,見第一張圖):api

{
  "isSingle": false,
  "multipleConfig": {
   "web": {
      "projectToken": "c266628559a28b71447aadc7c82a424ccd2f8f1fc9f20fa8f86c8485be10ada7",
      "projectId": "15",
      "yApiUrl": "http://127.0.0.1:3000",
      "menu": "文章",
      "projectType": "api"
    }
  },
  "core": {
      "projectToken": "c266628559a28b71447aadc7c82a424ccd2f8f1fc9f20fa8f86c8485be10ada7",
      "projectId": "15",
      "yApiUrl": "http://127.0.0.1:3000",
      "menu": "後臺",
      "projectType": "api"
    }
  }
}

 token來源: ide

 最終生成的yapi接口文檔效果: 函數

相關文章
相關標籤/搜索