ymfe / yapi Goto Github PK
View Code? Open in Web Editor NEWYApi 是一个可本地部署的、打通前后端及QA的、可视化的接口管理平台
Home Page: http://yapi.smart-xwork.cn/
License: Apache License 2.0
YApi 是一个可本地部署的、打通前后端及QA的、可视化的接口管理平台
Home Page: http://yapi.smart-xwork.cn/
License: Apache License 2.0
首先非常感谢大大的这个开源的项目!
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
刷新后是没有效果的!!!
定时任务 到时间自动跑一遍项目的测试 如果有失败的发邮件提醒 这种功能是否会考虑在未来添加以下呢?
东西很好用 感谢作者开源。
部署在本地centos 7 , 没问题
部署在云端centos 7 , 失败
想看看具体失败的原因、 没找日志文件。
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 的目录结构,服务器部分感觉写的不够系统.
以上,有什么说的不妥的地方请原谅.
如题,权限处理的不是很得当啊~
很不错。期待更完美
可以增加下websocket的路由钩子吗
new WebSocket 可以用 try catch 包起来,web 服务部署的是 https 的话, ws 协议就会报错
在官网为啥我看不到注册和登录的入口 ?
这里收集一下部署 YApi 平台的公司或团体,大家可以直接跟帖
貌似现在同一级别的接口,只有拖拽的动效,并没有实际去修改顺序,望修复,谢谢。
我的api的地址是这样的格式
http://xx.com/get/info/{user_id}
{user_id}是动态获取的,也是后台根据传入的{user_id}去获取数据的
get请求,目前不知道怎么在这里面设置请求。。请求增加一个这样的功能
挺不错的API管理工具。
在demo (http://yapi.demo.qunar.com) 上看,接口的请求参数貌似不能设置数据类型,请问能否加上?可以为参数设置数据类型,例如 string, int, boolean 这样。
QQ基本不用
环境:
开始部署
,日志信息如下: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
实在找不到原因,求助......
[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/react-dnd/lib/decorateHandler.js 49:19-41
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)
@ ./
[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/rc-upload/lib/AjaxUploader.js 51:18-40
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)
@ ./
在本地部署 根本就部署不了
yapi 自开源两月以来,深得广大开发者的喜爱, 感谢大家的支持!
yapi 需要的是集思广益,把这个产品做成一个真正提高工作效率的软件。现收集下 yapi 下个版本的需求,大家有产品功能上的痛点都可以提出来。下面列表是目前收集到的需求:
RT
必需
参数的赋值检查, 未赋值不能发送
非必需
参数未赋值时, 不添加到发送请求时的 URL 里感谢贵团队开源这么好的项目
火狐(55.0.2 64位)ubuntu 项目空间中的“添加项目”按钮点击没有反应,chromium能够正常使用
高级mock期望是在哪个版本?我已经升级到1.1.2 但是没有发现Mock期望的入口
遇到问题的版本: 1.2.6
管理员账号登录后进入用户管理
点开一个用户之后
用户名和email旁边有一个修改,点击修改后出input框,但是里面的内容不能改(怀疑相关事件被拦截了,现在暂时只能手工f12到input value处改完值再点提交...)
测试的headers不支持自定义 不支持从其他请求结果中获取
mock 的时候不能获取动态路由参数
还有就是 headers 、mock 是否可以支持字符串连接
比如headers 的 Authentication 设置为 "Token $.1.body.token" 这样
能否增加一个接口文档的预览页面及接口数据导出的功能或者接口?😋
我的api的地址是这样的格式
http://xx.com/get/info/{user_id}
get请求,目前不知道怎么在这里面设置请求。。请求增加一个这样的功能
从postman导入数据,若api的url为 /api/{id} 或 /api/{{id}} ,此类带参的api不会被导入至yapi。
可否定义一个通用的规则去处理此部分api?
打开很慢啊
hey, 项目不错哦。
不过遇到一个问题。
接口返回的HTTP Status不是200的时候,接口运行返回结果body里不显示json反而显示错误Title.
我们公司规范中requst validation error 的时候要返回422并把错误返回给客户端的。Postman处理的非常不错,你们能不能要调整一下哦 多谢了
是否增加定时运行测试集的功能
有计划吗?
配置邮件时,出现 unable to verify the first certificate
应该如何处理?
查了下,说是要关闭SSL。 npm config set strict-ssl false
。执行了这一行之后,
但是还是没有作用
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
现在的接口列表似乎可以拖拽, 但是好像拖拽后顺序并没有变
给测试用例增加一个最长相应时间,如果响应时间超过设定时间,表示测试不通过,并且该状态能够很结果验证的状态加以区分
标题不知道 说法是否合适。
我描述一下场景。
服务器端都是PHP 做开发, 登陆后 给浏览器写入cookie 。 因为不同人员或部门登陆,看到接口返回的结果内容不同。 我们想 在 Yapi 中 运行接口测试时候 带上cookie 。 这样就能方便的模拟不同部门调用接口了。
但 使用中发现,每一个接口 模拟 运行前都要 修改接口的 HEADERS 修改cookie 内容。
能否 再项目的配置中 定义一个全局的配置,或者变量。 配置一次cookie 后 ,本项目的全部 接口都带有这一个cookie 了。
我今天第一次使用 YAPI 也许是我没有看明白, 望各位能够帮忙 指导一下。
确认版本号没问题,请删除原有的安装文件和数据库,重新安装。
如果安装了 yapi-cli 工具,执行 yapi server
找不到命令,可尝试执行 yapi-cli server
如果是使用了yapi server
可视化部署出的问题,可查看下文档-> 内网部署方式
,熟悉 docker 童鞋可以使用 docker 部署,docker 部署的教程可以在 https://github.com/YMFE/yapi 这里找到。
如果还是无法安装,请不要选择最新的版本,可选择上一个版本或上上一个版本等,最新版本出问题的概率会比较大。
有问题请在下面留言,感谢大家的反馈。
接口路径参数一旦保存 就没办法在删除掉 在接口路径里删掉并不会修改数据库里的数据
还有mock的时候 无法获取接口路径里的参数
感谢yapi的开源,已成功部署,使用过程中发现一个问题:测试用例集合不能删除
控制台报错如下:Failed to load resource: the server responded with a status of 404 (Not Found) :api/col/del_case?caseid=11
能支持类似于postman那种添加请求参数的方式吗
不然需要一条一条的添加请求
"name|regexp": "京[a-z]\d{5}"
点击预览发现报错
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.