Giter Site home page Giter Site logo

ymfe / yapi Goto Github PK

View Code? Open in Web Editor NEW
27.1K 528.0 4.7K 227.36 MB

YApi 是一个可本地部署的、打通前后端及QA的、可视化的接口管理平台

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

License: Apache License 2.0

JavaScript 90.87% CSS 0.84% HTML 0.25% SCSS 7.23% Less 0.81%
api api-manager api-management api-test

yapi's Introduction

YApi 可视化接口管理平台

体验地址:

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

文档:

hellosean1025.github.io/yapi

平台介绍

avatar

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

QQ交流群:

644642474 主群可能已满

941802405 群2欢迎加入

特性

  • 基于 Json5 和 Mockjs 定义接口返回数据的结构和文档,效率提升多倍
  • 扁平化权限设计,即保证了大型企业级项目的管理,又保证了易用性
  • 类似 postman 的接口调试
  • 自动化测试, 支持对 Response 断言
  • MockServer 除支持普通的随机 mock 外,还增加了 Mock 期望功能,根据设置的请求过滤规则,返回期望数据
  • 支持 postman, har, swagger 数据导入
  • 免费开源,内网部署,信息再也不怕泄露了

内网部署

环境要求

  • nodejs(7.6+)
  • mongodb(2.6+)
  • git

安装

使用我们提供的 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 的一些客户

  • 去哪儿
  • 携程
  • 艺龙
  • 美团
  • 百度
  • 腾讯
  • 阿里巴巴
  • 京东
  • 今日头条
  • 唯品支付
  • 链家网
  • 快手
  • 便利蜂
  • 中商惠民
  • 新浪
  • VIPKID
  • 马蜂窝
  • 伴鱼
  • 旷视科技

Authors

License

Apache License 2.0

yapi's People

Contributors

2234839 avatar aimuz avatar amiezhang avatar amnsss avatar ariesly15 avatar billlucky avatar chenguangwu avatar chenlizhi55 avatar congqiu avatar dear-lizhihua avatar dependabot[bot] avatar duicym avatar dwb1994 avatar fjc0k avatar furioncs avatar gandao avatar gaoxiaomumu avatar hellosean1025 avatar jason-joo avatar jayzou avatar kangofchen avatar lwg529 avatar onvno avatar redhatxl avatar ryan-miao avatar shouldnotappearcalm avatar spiritree avatar tangcent avatar wxxcarl avatar yuu2lee4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yapi's Issues

特意登录来感谢并且提一个问题!!!

首先非常感谢大大的这个开源的项目!

UI非常的赞,比之大多同类项目赏心悦目很多!

但是有个问题很影响使用体验!就是我是后端准备用这个来测试api的使用,在返回的数据body里面,都是乱吃一坨显示!

没有格式化!
{ "cookie": [], "Date": "Sat, 18 Nov 2017 03:14:17 GMT", "Server": "Apache/2.4.10", "Cache-Control": "private, no-cache", "X-Catalyst": "5.90075", "Content-Length": "678", "Connection": "close", "Content-Type": "text/html; charset=utf-8", "Proxy-Connection": "keep-alive" }

就是如上一坨的没有格式化!希望得到的效果是:

{
    "cookie": [],
    "Date": "Sat, 18 Nov 2017 03:14:17 GMT",
    "Server": "Apache/2.4.10",
    "Cache-Control": "private, no-cache",
    "X-Catalyst": "5.90075",
    "Content-Length": "678",
    "Connection": "close",
    "Content-Type": "text/html; charset=utf-8",
    "Proxy-Connection": "keep-alive"
}

还有一个问题就是修改源码不知道为什么没有效果!
我修改的是:yapi/client/components/Postman/Postman.js

刷新后是没有效果的!!!

[BUG]用户管理里面没办法编辑用户的用户名和email项

遇到问题的版本: 1.2.6

管理员账号登录后进入用户管理
点开一个用户之后
用户名和email旁边有一个修改,点击修改后出input框,但是里面的内容不能改(怀疑相关事件被拦截了,现在暂时只能手工f12到input value处改完值再点提交...)

内部部署配置邮件

配置邮件时,出现 unable to verify the first certificate应该如何处理?

查了下,说是要关闭SSL。 npm config set strict-ssl false。执行了这一行之后,
但是还是没有作用

本周将会完成的功能点

  1. 参数值支持多个动态参数,类似 str{@email}str{$.55.body.id}
  2. 参数值支持管道表达式,例如 {@email | concat: pass | md5 | substr: 1,10}
  3. 接口编辑参数可拖动排序
  4. 修复路径参数无法删除问题

yapi.js文件中引用 config.json 路径错误以及其他一些建议

1.yapi.js文件引用config.json 路径错误
yapi.js文件中引用config.json应该是 require('../config.json’),原来的写法路径写错了,是不能正确引用到的config.json的

2.当前系统看起来不支持 mongo 集群的
我们想要部署这套系统到线上环境,但是我们线上的 mongodb 是集群的,目前看起来不支持

3.当前系统的 cli不支持部署到 多台机器
因为管理员账号的冲突关系,不能用 cli 来部署到两台机器,我只能手动复制已经部署的代码到另一台机器,然后手动修改数据库的配置,比较麻烦.

4.登录校验部分不够独立
一般公司都有一套登录系统,怎么方便将公司的登录系统方便接入此系统希望你们能考虑支持下哈,太感谢了,否则我们接入的话可能需要二次开发

5.对二次开发的支持不太好
期待配置文件可以区分 dev beta prod环境

以上问题我们这边也在尝试二次开发,当然更希望你们提供一套更好的方案.
还有,你们的 node 部分能不能采用 ssugar.js 或者 think.js 的目录结构,服务器部分感觉写的不够系统.

以上,有什么说的不妥的地方请原谅.

YApi 安装出现问题请看这里

  1. 确保 node 版本=> 7.6,请运行 node -v 查看版本号
  2. 确保 mongodb 版本 => 2.6,请运行 mongo --version 查看版本号
  3. 确保安装了 npm, 运行 npm -v 查看版本号
  4. 确保安装了 git,运行 git --version 查看版本号
  5. 确保安装了 node-gyp 环境,配置方法

确认版本号没问题,请删除原有的安装文件和数据库,重新安装。

如果安装了 yapi-cli 工具,执行 yapi server 找不到命令,可尝试执行 yapi-cli server

如果是使用了yapi server 可视化部署出的问题,可查看下文档-> 内网部署方式,熟悉 docker 童鞋可以使用 docker 部署,docker 部署的教程可以在 https://github.com/YMFE/yapi 这里找到。

如果还是无法安装,请不要选择最新的版本,可选择上一个版本或上上一个版本等,最新版本出问题的概率会比较大。

有问题请在下面留言,感谢大家的反馈。

测试用例增加响应时间的验证

给测试用例增加一个最长相应时间,如果响应时间超过设定时间,表示测试不通过,并且该状态能够很结果验证的状态加以区分

HTTP status 不是200时接口运行返回结果Body有问题

hey, 项目不错哦。
不过遇到一个问题。
接口返回的HTTP Status不是200的时候,接口运行返回结果body里不显示json反而显示错误Title.
我们公司规范中requst validation error 的时候要返回422并把错误返回给客户端的。Postman处理的非常不错,你们能不能要调整一下哦 多谢了

是否会添加一个定时跑测试的功能

定时任务 到时间自动跑一遍项目的测试 如果有失败的发邮件提醒 这种功能是否会考虑在未来添加以下呢?

东西很好用 感谢作者开源。

api参数问题

我的api的地址是这样的格式
http://xx.com/get/info/{user_id}
{user_id}是动态获取的,也是后台根据传入的{user_id}去获取数据的
get请求,目前不知道怎么在这里面设置请求。。请求增加一个这样的功能

ui错误

移动到行程搜索,下面的记账旁边的 几个功能按钮出来了
image
只有移动到行程搜索上有这个情况

版本:1.2.5

添加项目按钮不能用

火狐(55.0.2 64位)ubuntu 项目空间中的“添加项目”按钮点击没有反应,chromium能够正常使用

关于添加请求参数

能支持类似于postman那种添加请求参数的方式吗
不然需要一条一条的添加请求

[BUG]接口路径参数问题

接口路径参数一旦保存 就没办法在删除掉 在接口路径里删掉并不会修改数据库里的数据

还有mock的时候 无法获取接口路径里的参数

安装报错

Error: Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials.

mongo 是2.6.9的版本
系统环境centos 6

提几个问题

测试的headers不支持自定义 不支持从其他请求结果中获取

mock 的时候不能获取动态路由参数

还有就是 headers 、mock 是否可以支持字符串连接
比如headers 的 Authentication 设置为 "Token $.1.body.token" 这样

ykit pack -m 打包出现错误

[error] (webpack)/buildin/module.js
Module build failed: ReferenceError: Unknown plugin "transform-runtime" specifie
d in "base" at 0, attempted to resolve relative to "C:\Users\ianguo\AppData\
Roaming\npm\node_modules\ykit\node_modules\webpack\buildin"
at C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-core\lib\transf
ormation\file\options\option-manager.js:180:17
at Array.map (native)
at Function.normalisePlugins (C:\Users\ianguo\source\repos\yapi\yapi\node_mo
dules\babel-core\lib\transformation\file\options\option-manager.js:158:20)
at OptionManager.mergeOptions (C:\Users\ianguo\source\repos\yapi\yapi\node_m
odules\babel-core\lib\transformation\file\options\option-manager.js:234:36)
at OptionManager.init (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\b
abel-core\lib\transformation\file\options\option-manager.js:368:12)
at File.initOptions (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\bab
el-core\lib\transformation\file\index.js:212:65)
at new File (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-core
lib\transformation\file\index.js:135:24)
at Pipeline.transform (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\b
abel-core\lib\transformation\pipeline.js:46:16)
at transpile (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-load
er\lib\index.js:46:20)
at C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-loader\lib\fs-c
ache.js:79:18
@ ./~/moment/moment.js 1:0-107

[error] C:/Users/ianguo/AppData/Roaming/npm//ykit//process/browser.js
Module build failed: ReferenceError: Unknown plugin "transform-runtime" specifie
d in "base" at 0, attempted to resolve relative to "C:\Users\ianguo\AppData\
Roaming\npm\node_modules\ykit\node_modules\process"
at C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-core\lib\transf
ormation\file\options\option-manager.js:180:17
at Array.map (native)
at Function.normalisePlugins (C:\Users\ianguo\source\repos\yapi\yapi\node_mo
dules\babel-core\lib\transformation\file\options\option-manager.js:158:20)
at OptionManager.mergeOptions (C:\Users\ianguo\source\repos\yapi\yapi\node_m
odules\babel-core\lib\transformation\file\options\option-manager.js:234:36)
at OptionManager.init (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\b
abel-core\lib\transformation\file\options\option-manager.js:368:12)
at File.initOptions (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\bab
el-core\lib\transformation\file\index.js:212:65)
at new File (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-core
lib\transformation\file\index.js:135:24)
at Pipeline.transform (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\b
abel-core\lib\transformation\pipeline.js:46:16)
at transpile (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-load
er\lib\index.js:46:20)
at C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-loader\lib\fs-c
ache.js:79:18
@ ./~/axios/lib/defaults.js 1:0-103

[error] .//disposables/modules/index.js
Module build failed: ReferenceError: [BABEL] C:\Users\ianguo\source\repos\yapi\y
api\node_modules\disposables\modules\index.js: Using removed Babel 5 option: C:
Users\ianguo\source\repos\yapi\yapi\node_modules\disposables.babelrc.stage - Ch
eck out the corresponding stage-x presets http://babeljs.io/docs/plugins/#preset
s
at Logger.error (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-c
ore\lib\transformation\file\logger.js:41:11)
at OptionManager.mergeOptions (C:\Users\ianguo\source\repos\yapi\yapi\node_m
odules\babel-core\lib\transformation\file\options\option-manager.js:220:20)
at OptionManager.init (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\b
abel-core\lib\transformation\file\options\option-manager.js:368:12)
at File.initOptions (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\bab
el-core\lib\transformation\file\index.js:212:65)
at new File (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-core
lib\transformation\file\index.js:135:24)
at Pipeline.transform (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\b
abel-core\lib\transformation\pipeline.js:46:16)
at transpile (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-load
er\lib\index.js:46:20)
at C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-loader\lib\fs-c
ache.js:79:18
at ReadFileContext.callback (C:\Users\ianguo\source\repos\yapi\yapi\node_mod
ules\babel-loader\lib\fs-cache.js:15:14)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:420:13)
@ ./
/react-dnd/lib/decorateHandler.js 49:19-41

[error] C:/Users/ianguo/AppData/Roaming/npm//ykit//buffer/index.js
Module build failed: ReferenceError: Unknown plugin "transform-runtime" specifie
d in "base" at 0, attempted to resolve relative to "C:\Users\ianguo\AppData\
Roaming\npm\node_modules\ykit\node_modules\buffer"
at C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-core\lib\transf
ormation\file\options\option-manager.js:180:17
at Array.map (native)
at Function.normalisePlugins (C:\Users\ianguo\source\repos\yapi\yapi\node_mo
dules\babel-core\lib\transformation\file\options\option-manager.js:158:20)
at OptionManager.mergeOptions (C:\Users\ianguo\source\repos\yapi\yapi\node_m
odules\babel-core\lib\transformation\file\options\option-manager.js:234:36)
at OptionManager.init (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\b
abel-core\lib\transformation\file\options\option-manager.js:368:12)
at File.initOptions (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\bab
el-core\lib\transformation\file\index.js:212:65)
at new File (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-core
lib\transformation\file\index.js:135:24)
at Pipeline.transform (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\b
abel-core\lib\transformation\pipeline.js:46:16)
at transpile (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-load
er\lib\index.js:46:20)
at C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-loader\lib\fs-c
ache.js:79:18
@ ./~/json-schema-ref-parser/lib/index.js 1:0-100

[error] C:/Users/ianguo/AppData/Roaming/npm//ykit//stream-http/index.js
Module build failed: ReferenceError: Unknown plugin "transform-runtime" specifie
d in "base" at 0, attempted to resolve relative to "C:\Users\ianguo\AppData\
Roaming\npm\node_modules\ykit\node_modules\stream-http"
at C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-core\lib\transf
ormation\file\options\option-manager.js:180:17
at Array.map (native)
at Function.normalisePlugins (C:\Users\ianguo\source\repos\yapi\yapi\node_mo
dules\babel-core\lib\transformation\file\options\option-manager.js:158:20)
at OptionManager.mergeOptions (C:\Users\ianguo\source\repos\yapi\yapi\node_m
odules\babel-core\lib\transformation\file\options\option-manager.js:234:36)
at OptionManager.init (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\b
abel-core\lib\transformation\file\options\option-manager.js:368:12)
at File.initOptions (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\bab
el-core\lib\transformation\file\index.js:212:65)
at new File (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-core
lib\transformation\file\index.js:135:24)
at Pipeline.transform (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\b
abel-core\lib\transformation\pipeline.js:46:16)
at transpile (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-load
er\lib\index.js:46:20)
at C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-loader\lib\fs-c
ache.js:79:18
@ ./~/json-schema-ref-parser/lib/resolvers/http.js 3:11-26

[error] C:/Users/ianguo/AppData/Roaming/npm//ykit//https-browserify/index.js
Module build failed: ReferenceError: Unknown plugin "transform-runtime" specifie
d in "base" at 0, attempted to resolve relative to "C:\Users\ianguo\AppData\
Roaming\npm\node_modules\ykit\node_modules\https-browserify"
at C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-core\lib\transf
ormation\file\options\option-manager.js:180:17
at Array.map (native)
at Function.normalisePlugins (C:\Users\ianguo\source\repos\yapi\yapi\node_mo
dules\babel-core\lib\transformation\file\options\option-manager.js:158:20)
at OptionManager.mergeOptions (C:\Users\ianguo\source\repos\yapi\yapi\node_m
odules\babel-core\lib\transformation\file\options\option-manager.js:234:36)
at OptionManager.init (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\b
abel-core\lib\transformation\file\options\option-manager.js:368:12)
at File.initOptions (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\bab
el-core\lib\transformation\file\index.js:212:65)
at new File (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-core
lib\transformation\file\index.js:135:24)
at Pipeline.transform (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\b
abel-core\lib\transformation\pipeline.js:46:16)
at transpile (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-load
er\lib\index.js:46:20)
at C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-loader\lib\fs-c
ache.js:79:18
@ ./~/json-schema-ref-parser/lib/resolvers/http.js 4:12-28

[error] .//attr-accept/dist/index.js
Module build failed: ReferenceError: [BABEL] C:\Users\ianguo\source\repos\yapi\y
api\node_modules\attr-accept\dist\index.js: Using removed Babel 5 option: C:\Use
rs\ianguo\source\repos\yapi\yapi\node_modules\attr-accept.babelrc.stage - Check
out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets
at Logger.error (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-c
ore\lib\transformation\file\logger.js:41:11)
at OptionManager.mergeOptions (C:\Users\ianguo\source\repos\yapi\yapi\node_m
odules\babel-core\lib\transformation\file\options\option-manager.js:220:20)
at OptionManager.init (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\b
abel-core\lib\transformation\file\options\option-manager.js:368:12)
at File.initOptions (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\bab
el-core\lib\transformation\file\index.js:212:65)
at new File (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-core
lib\transformation\file\index.js:135:24)
at Pipeline.transform (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\b
abel-core\lib\transformation\pipeline.js:46:16)
at transpile (C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-load
er\lib\index.js:46:20)
at C:\Users\ianguo\source\repos\yapi\yapi\node_modules\babel-loader\lib\fs-c
ache.js:79:18
at ReadFileContext.callback (C:\Users\ianguo\source\repos\yapi\yapi\node_mod
ules\babel-loader\lib\fs-cache.js:15:14)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:420:13)
@ ./
/rc-upload/lib/AjaxUploader.js 51:18-40

部署之后,不能删除测试用例

感谢yapi的开源,已成功部署,使用过程中发现一个问题:测试用例集合不能删除
控制台报错如下:Failed to load resource: the server responded with a status of 404 (Not Found) :api/col/del_case?caseid=11

[request feature]接口备注支持markdown

request body 为json时,参数的备注相关信息没有地方备注 只能写在接口备注里面,希望接口备注能支持markdown。参照postman
image

request body 为file 或者 raw的时候 输入框高度太小。
image

全局的cookie 设置

标题不知道 说法是否合适。
我描述一下场景。

服务器端都是PHP 做开发, 登陆后 给浏览器写入cookie 。 因为不同人员或部门登陆,看到接口返回的结果内容不同。 我们想 在 Yapi 中 运行接口测试时候 带上cookie 。 这样就能方便的模拟不同部门调用接口了。

但 使用中发现,每一个接口 模拟 运行前都要 修改接口的 HEADERS 修改cookie 内容。

能否 再项目的配置中 定义一个全局的配置,或者变量。 配置一次cookie 后 ,本项目的全部 接口都带有这一个cookie 了。

我今天第一次使用 YAPI 也许是我没有看明白, 望各位能够帮忙 指导一下。

高级mock期望

高级mock期望是在哪个版本?我已经升级到1.1.2 但是没有发现Mock期望的入口

API`运行`板块的一些建议

RT

  1. 建议支持必需参数的赋值检查, 未赋值不能发送
  2. 建议非必需参数未赋值时, 不添加到发送请求时的 URL 里
  3. 建议参数支持默认值

感谢贵团队开源这么好的项目

内网本地部署报错:Error: Cannot find module 'C:\Program'

环境:

  • MongoDB shell version v3.4.10
  • Node v8.9.0
  • npm v5.3.0
    已经成功启动可视化部署,配置完成后点击开始部署,日志信息如下:
module.js:538
 throw err;
 ^
 
 Error: Cannot find module 'C:\Program'
 at Function.Module._resolveFilename (module.js:536:15)
 at Function.Module._load (module.js:466:25)
 at Function.Module.runMain (module.js:676:10)
 at startup (bootstrap_node.js:187:16)
 at bootstrap_node.js:608:3

实在找不到原因,求助......

yapi 下个版本需求收集

yapi 自开源两月以来,深得广大开发者的喜爱, 感谢大家的支持!

yapi 需要的是集思广益,把这个产品做成一个真正提高工作效率的软件。现收集下 yapi 下个版本的需求,大家有产品功能上的痛点都可以提出来。下面列表是目前收集到的需求:

  • yapi 默认集成 ldap 登录方式
  • yapi 做一个 sso 登录插件,基于现有的 qsso 改造成大多数公司可用的
  • 接口运行参数值支持 函数表达式,支持可视化选择 mock 参数和 变量参数
  • 接口运行支持加工运行前后的 request 和 response ,主要是处理加密的接口或各种 token 参数问题
  • 接口集可支持服务端代理,配合 jenkins 实现契约型测试
  • 以项目为维度的自动化代码生成功能,默认提供一些 js,java, php 等语言相关框架的模板,可高度自定义生成模板
  • 支持 dubble 等 rpc 接口定义
  • 支持对 response header 定义
  • 增加接口改动历史功能
  • 版本管理(实现方式还未想好)
  • 接口文档按分类组织接口
  • 接口文档备注支持 markdown
  • 环境设置支持全局 header 和 自定义变量
  • 测试集复制功能
  • 接口菜单和测试集菜单可调整顺序

部署用户收集

这里收集一下部署 YApi 平台的公司或团体,大家可以直接跟帖

postman的json解析

从postman导入数据,若api的url为 /api/{id} 或 /api/{{id}} ,此类带参的api不会被导入至yapi。
可否定义一个通用的规则去处理此部分api?

接口文档按分类组织接口

  • 接口按分类组织
    image
  • 导出的接口文档html 如下:

并且接口排列顺序是mongo中存储顺序 不是页面展示的顺序

image

希望,能生成类似这样的文档:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.