yapi README

The project's README from github.com/YMFE/yapi. As one markdown file: README.md.

YApi 可视化接口管理平台

体验地址:

http://yapi.smart-xwork.cn/

文档:

hellosean1025.github.io/yapi

平台介绍

avatar

YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。

QQ交流群:

644642474 主群可能已满

941802405 群2欢迎加入

特性

内网部署

环境要求

安装

使用我们提供的 yapi-cli 工具,部署 YApi 平台是非常容易的。执行 yapi server 启动可视化部署程序,输入相应的配置和点击开始部署,就能完成整个网站的部署。部署完成之后,可按照提示信息,执行 node/{网站路径/server/app.js} 启动服务器。在浏览器打开指定url, 点击登录输入您刚才设置的管理员邮箱,默认密码为 ymfe.org 登录系统(默认密码可在个人中心修改)。

npm install -g yapi-cli --registry https://registry.npm.taobao.org
yapi server 

服务管理

利用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 //重启服务

升级

升级项目版本是非常容易的,并且不会影响已有的项目数据,只会同步 vendors 目录下的源码文件。

cd  {项目目录}
yapi ls //查看版本号列表
yapi update //更新到最新版本
yapi update -v {Version} //更新到指定版本

教程

YApi 插件

代码生成

YApi docker部署(非官方)

YApi 一些工具

YApi 的一些客户

Authors

License

Apache License 2.0

yapi (YMFE/yapi)

api-management
Searching Database…

27.7K ·GitHub
What is this?YApi is a visual API management platform for developers, product managers and QA: one place to document, debug, mock and automatically test your APIs.
Is it a hosted service I sign up for, or something I run myself?You run it yourself: YApi is a full web platform you deploy on your own server — typically the company intranet — and the whole team uses it through a browser.
How do I get it running?Run 'npm install -g yapi-cli' and then 'yapi server' — a visual deployment wizard finishes setup in your browser; afterwards the site starts with 'node /server/app.js'. Unofficial Docker and docker-compose images also exist.
What does my server need before installing?Node.js 7.6 or newer, MongoDB 2.6 or newer, and git — that is the whole checklist on the server side.
Any gotchas right after deployment?The initial admin account uses the default password 'ymfe.org', so change it in the personal center after first login. Upgrades are painless though: 'yapi update' refreshes sources without affecting existing project data.
Does the team need to install anything to use it day to day?No — once the server is deployed, members just open the instance URL in a browser and log in, so it works from any machine with a browser.
Is it free to use, including at work?Yes — YApi is open source under the Apache License 2.0, and the README stresses it is free; no paid tiers are mentioned.
What can it do besides storing API docs?Much of the workflow happens inside YApi: Postman-style request debugging, automated tests with Response assertions, and a built-in MockServer. Interfaces and their response structures are described with Json5 and Mockjs, and you can import existing data from Postman, HAR or Swagger.
How does the MockServer decide what to return?Besides ordinary random mock data, it has a Mock Expectation feature: you define request filtering rules, and matching requests get your expected response instead of random values.
Can I generate client code from my API definitions?Yes, via ecosystem tools: yapi-to-typescript generates TypeScript request functions, yapi-gen-js-code generates JavaScript request functions, and SwiftJSONModeler generates Swift models from YApi interface definitions.
Is this battle-tested or a hobby project?It is widely used in production — the README lists companies like Qunar, Ctrip, Meituan, Baidu, Tencent, Alibaba, JD, Toutiao and Kuaishou among its customers.
Creator
YMFE
Size
227.4 MB
Stars
27.7K
Age
10y
Commits · 90 Days