yapi/README.md

131 lines
6.0 KiB
Markdown
Raw Permalink Normal View History

2017-10-05 10:55:27 +08:00
## YApi 可视化接口管理平台
2019-07-01 11:57:58 +08:00
2020-10-10 19:22:29 +08:00
体验地址:
2021-07-20 13:46:22 +08:00
[http://yapi.smart-xwork.cn/](http://yapi.smart-xwork.cn/)
2020-10-10 19:22:29 +08:00
2019-07-01 11:58:28 +08:00
文档:
<p><a target="_blank" href="https://hellosean1025.github.io/yapi">hellosean1025.github.io/yapi</a></p>
2019-07-01 11:57:58 +08:00
2017-10-05 09:12:44 +08:00
### 平台介绍
2017-08-23 10:15:06 +08:00
![avatar](yapi-base-flow.jpg)
2017-08-22 16:10:35 +08:00
2017-10-08 16:20:27 +08:00
YApi 是<strong>高效</strong><strong>易用</strong><strong>功能强大</strong>的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 APIYApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。
2017-07-03 16:16:05 +08:00
2019-10-11 17:27:42 +08:00
**QQ交流群**:
2019-11-01 15:12:14 +08:00
644642474 **主群可能已满**
2019-10-11 17:27:42 +08:00
2019-10-11 17:24:59 +08:00
941802405 **群2欢迎加入**
2017-10-05 10:55:27 +08:00
2017-10-05 09:12:44 +08:00
### 特性
2017-10-27 19:52:23 +08:00
* 基于 Json5 和 Mockjs 定义接口返回数据的结构和文档,效率提升多倍
* 扁平化权限设计,即保证了大型企业级项目的管理,又保证了易用性
* 类似 postman 的接口调试
* 自动化测试, 支持对 Response 断言
* MockServer 除支持普通的随机 mock 外,还增加了 Mock 期望功能,根据设置的请求过滤规则,返回期望数据
* 支持 postman, har, swagger 数据导入
* 免费开源,内网部署,信息再也不怕泄露了
2017-08-22 16:06:56 +08:00
2017-10-05 09:12:44 +08:00
### 内网部署
#### 环境要求
* nodejs7.6+)
* mongodb2.6+
2018-04-28 20:18:46 +08:00
* git
2017-10-05 09:12:44 +08:00
#### 安装
2017-10-16 20:33:23 +08:00
使用我们提供的 yapi-cli 工具,部署 YApi 平台是非常容易的。执行 yapi server 启动可视化部署程序,输入相应的配置和点击开始部署,就能完成整个网站的部署。部署完成之后,可按照提示信息,执行 node/{网站路径/server/app.js} 启动服务器。在浏览器打开指定url, 点击登录输入您刚才设置的管理员邮箱,默认密码为 ymfe.org 登录系统(默认密码可在个人中心修改)。
2017-08-22 16:06:56 +08:00
2017-10-05 09:12:44 +08:00
npm install -g yapi-cli --registry https://registry.npm.taobao.org
2017-10-16 20:33:23 +08:00
yapi server
#### 服务管理
2019-08-17 21:09:34 +08:00
利用pm2方便服务管理维护。
npm install pm2 -g //安装pm2
cd {项目目录}
pm2 start "vendors/server/app.js" --name yapi //pm2管理yapi服务
pm2 info yapi //查看服务信息
pm2 stop yapi //停止服务
pm2 restart yapi //重启服务
2017-10-08 16:46:04 +08:00
2017-10-13 15:20:09 +08:00
#### 升级
升级项目版本是非常容易的,并且不会影响已有的项目数据,只会同步 vendors 目录下的源码文件。
2017-10-08 16:46:04 +08:00
cd {项目目录}
2017-10-16 20:33:23 +08:00
yapi ls //查看版本号列表
yapi update //更新到最新版本
yapi update -v {Version} //更新到指定版本
2018-08-27 18:28:13 +08:00
### 教程
* [使用 YApi 管理 API 文档,测试, mock](https://juejin.im/post/5acc879f6fb9a028c42e8822)
* [自动更新 Swagger 接口数据到 YApi 平台](https://juejin.im/post/5af500e251882567096140dd)
* [自动化测试](https://juejin.im/post/5a388892f265da430e4f4681)
2020-10-26 15:13:46 +08:00
* [GTest(基于YApi)接口研发效能提升10倍 实战](https://mp.weixin.qq.com/s/z66f7bRX8aAOppAtBIB7Uw)
2017-10-08 16:46:04 +08:00
2018-04-16 21:28:26 +08:00
### YApi 插件
2017-12-08 21:22:43 +08:00
* [yapi sso 登录插件](https://github.com/YMFE/yapi-plugin-qsso)
2018-04-16 21:28:26 +08:00
* [yapi cas 登录插件](https://github.com/wsfe/yapi-plugin-cas) By wsfe
2019-02-13 17:39:40 +08:00
* [yapi gitlab集成插件](https://github.com/cyj0122/yapi-plugin-gitlab)
2019-03-22 16:28:01 +08:00
* [oauth2.0登录](https://github.com/xwxsee2014/yapi-plugin-oauth2)
2019-02-13 17:39:40 +08:00
* [rap平台数据导入](https://github.com/wxxcarl/yapi-plugin-import-rap)
2019-02-15 11:23:57 +08:00
* [dingding](https://github.com/zgs225/yapi-plugin-dding) 钉钉机器人推送插件
2019-03-07 13:23:50 +08:00
* [export-docx-data](https://github.com/inceptiongt/Yapi-plugin-export-docx-data) 数据导出docx文档
2019-06-07 10:42:20 +08:00
* [interface-oauth-token](https://github.com/shouldnotappearcalm/yapi-plugin-interface-oauth2-token) 定时自动获取鉴权token的插件
2019-07-01 17:46:29 +08:00
* [import-swagger-customize](https://github.com/follow-my-heart/yapi-plugin-import-swagger-customize) 导入指定swagger接口
2017-12-08 21:22:43 +08:00
2019-02-13 15:57:42 +08:00
### 代码生成
2019-01-09 22:11:32 +08:00
* [yapi-to-typescript根据 YApi 的接口定义生成 TypeScript 的请求函数](https://github.com/fjc0k/yapi-to-typescript)
2019-02-13 15:57:42 +08:00
* [yapi-gen-js-code: 根据 YApi 的接口定义生成 javascript 的请求函数](https://github.com/hellosean1025/yapi-gen-js-code)
2021-04-28 21:02:30 +08:00
* [SwiftJSONModeler:根据 YApi 的接口生成 Swift 模型代码](https://github.com/CodeOcenS/SwiftJSONModeler)
2018-10-18 11:05:50 +08:00
2018-08-10 16:42:56 +08:00
### YApi docker部署非官方
2018-05-14 10:43:42 +08:00
* [使用 alpine 版 docker 镜像快速部署 yapi](https://www.jianshu.com/p/a97d2efb23c5)
2020-06-29 10:38:24 +08:00
* [docker-yapi: 基于官方yapi-cli的docker-compose方案](https://github.com/Ryan-Miao/docker-yapi)
2019-06-27 17:36:45 +08:00
* [docker-compose一键部署yapi](https://github.com/jinfeijie/yapi)
2019-07-30 09:43:39 +08:00
* [docker-YApi: 更易用的 YApi 镜像](https://github.com/fjc0k/docker-YApi)
* [使用DockerCompose构建部署Yapi](https://github.com/MyHerux/daily-code/blob/master/Program/%E5%B7%A5%E5%85%B7%E7%AF%87/Yapi/%E4%BD%BF%E7%94%A8DockerCompose%E6%9E%84%E5%BB%BA%E9%83%A8%E7%BD%B2Yapi.md)
2021-07-11 09:56:27 +08:00
* [yapi-docker: dockerized yapi deployment all in one](https://github.com/williamlsh/yapi-docker)
2018-04-16 21:28:26 +08:00
2019-02-13 15:57:42 +08:00
### YApi 一些工具
2020-03-18 14:12:28 +08:00
* [Api Generator](https://github.com/Forgus/api-generator) 接口文档自动生成插件(零入侵)
2019-02-13 15:57:42 +08:00
* [mysql服务http工具,可配合做自动化测试](https://github.com/hellosean1025/http-mysql-server)
* [idea 一键上传接口到yapi插件](https://github.com/diwand/YapiIdeaUploadPlugin)
2019-11-13 20:21:48 +08:00
* [idea 接口上传调试插件 easy-yapi](https://easyyapi.com/)
2019-12-30 09:31:45 +08:00
* [执行 postgres sql 的服务](https://github.com/shouldnotappearcalm/http-postgres-server)
2021-04-29 11:47:10 +08:00
* [SpringBoot依赖自动生成YApi](https://github.com/NoBugBoy/YDoc)
* [Yapi X 一键生成接口文档, 上传到yapi, rap2, eolinker等IDEA插件](https://github.com/jetplugins/yapix)
2019-02-13 15:57:42 +08:00
2017-11-09 12:02:27 +08:00
### YApi 的一些客户
* 去哪儿
* 携程
* 艺龙
2018-08-07 15:40:20 +08:00
* 美团
* 百度
2019-01-23 12:10:59 +08:00
* 腾讯
2018-08-07 15:40:20 +08:00
* 阿里巴巴
2017-11-09 12:02:27 +08:00
* 京东
2019-01-30 13:51:47 +08:00
* 今日头条
2017-10-17 17:33:59 +08:00
* 唯品支付
* 链家网
* 快手
2017-11-09 12:02:27 +08:00
* 便利蜂
2018-08-07 15:40:20 +08:00
* 中商惠民
2018-09-21 11:04:43 +08:00
* 新浪
2019-04-03 18:41:20 +08:00
* VIPKID
2019-07-02 11:20:11 +08:00
* 马蜂窝
* 伴鱼
* 旷视科技
2017-11-09 12:02:27 +08:00
2017-10-20 16:35:06 +08:00
### Authors
2018-05-21 11:34:18 +08:00
* [hellosean1025](https://github.com/hellosean1025)
2019-01-30 13:51:47 +08:00
* [gaoxiaomumu](https://github.com/gaoxiaomumu)
2017-10-20 16:35:06 +08:00
* [zwjamnsss](https://github.com/amnsss)
* [dwb1994](https://github.com/dwb1994)
* [fungezi](https://github.com/fungezi)
2021-08-24 16:19:56 +08:00
* [ariesly15](https://github.com/ariesly15)
2019-01-30 13:51:47 +08:00
2018-01-02 07:47:17 -06:00
2017-10-05 09:12:44 +08:00
### License
2018-06-07 16:39:58 +08:00
Apache License 2.0
2017-08-21 21:18:29 +08:00