yapi-pro / yapi Goto Github PK
View Code? Open in Web Editor NEWThis project forked from ymfe/yapi
YApi 是一个可本地部署的、打通前后端及QA的、可视化的接口管理平台。我们长期维护YApi的在线版本,推荐使用:https://yapi.pro
Home Page: https://yapi.pro
License: Apache License 2.0
This project forked from ymfe/yapi
YApi 是一个可本地部署的、打通前后端及QA的、可视化的接口管理平台。我们长期维护YApi的在线版本,推荐使用:https://yapi.pro
Home Page: https://yapi.pro
License: Apache License 2.0
~ 1.9.3
~
请问怎么让返回的内容包含定义的所有的字段
有时候这样
{
"createdBy": "magna dolore pariatur",
"createdTime": "2016-12-23T20:12:29.083Z",
"description": "reprehenderit ut laborum ex",
"id": 450000201701227900,
"isSystem": "ipsum",
"updatedTime": "2015-05-04T04:08:21.981Z"
}
有时候返回是这样
{
"createdBy": "magna dolore pariatur",
"createdTime": "2016-12-23T20:12:29.083Z",
"description": "reprehenderit ut laborum ex",
"id": 450000201701227900,
}
~ 必现
~ chrome
~ mac
~
~
~
~
例如:
sequenceDiagram
Alice->>+John: Hello John, how are you?
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
John-->>-Alice: I feel great!
并不能渲染成功
1.9.5
执行断言报只读权限报错
验证结果
执行脚本:assert.equal(body.responseCode, 0)
,
Error: EROFS: read-only file system, mkdir '/sys/fs/cgroup/memory/safeify'
执行脚本:assert.equal(body.responseCode, 0)
chrome
CentOS Linux release 8.5.2111
~ 1.92.
~ postman v2格式数据导入支持
希望能支持下多级目录功能
~ yapi 1.9.2
~ 执行 npm install -g yapi-pro-cli --registry https://registry.npm.taobao.org
出现问题:
6213 error code EEXIST
6214 error syscall symlink
6215 error path ../lib/node_modules/yapi-pro-cli/bin/yapi-cli
6216 error dest /home/node/nodejs/node_global/bin/yapi
6217 error errno -17
6218 error EEXIST: file already exists, symlink '../lib/node_modules/yapi-pro-cli/bin/yapi-cli'
6219 error File exists: /home/node/nodejs/node_global/bin/yapi
6220 error Remove the existing file and try again, or run npm
6221 error with --force to overwrite files recklessly.
6222 verbose exit [ -17, true ]
~
按照yapi文档安装yapi-cli,使用PM2管理服务
~ Chrome windows 10, 91.0.4472.164(正式版本) (64 位)
CentOS Linux release 7.4.1708
node v14.16.1
~ 最新版本
~接口-->编辑-->模板选择中,array数组的item--->预览效果数组为空
~ 定义一个接口
~ 进入接口详情
~ 点击tab“编辑”
~ “返回数据设置” -->JSON--》模板--》添加子节点为array---》array的子节点选择object--》添加子节点A,类似如下结构
[
{
a: '',
b: ''
}
]
~ “预览” 返回的数组为空
~ Chrome
Windows
~
1.9.5
~
高级MOCK的自定义脚本有问题,只要开启了高级mock脚本功能,接口访问就直接未响应,用了1.9.1版本就没有这个问题
~
~
~ 1.9.5
~无法确定Yapi-Pro有无mongo注入漏洞,怎么无缝升级到Yapi的1.12版本保留已注册用户信息和权限?
~
~
~
~
~
~
~
~
~
~
~ lasted
~后台新增用户
~
~
~
~
~
~
~
镜像:yapipro/yapi:laster
~
禁用注册功能后,管理员没有新增新用户的功能
~
~
~ 1.9.5
~ K8s环境下,容器被调度到其他节点,会初始化报错
~ 将容器删除,然后重新起一个服务,连接之前已经初始化号的数据库,此时应用会初始化报错,希望先查询是否初始化过服务,因为文件在docker中没有挂在,容器被调度到其他节点,服务就挂掉了
~ any
any
镜像 yapipro/yapi:1.9.5
docker run --network mynetwork --rm -it -v $PWD/config.json:/yapi/config.json yapipro/yapi server/install.js
log: mongodb load success...
初始化管理员账号成功,账号名:"[email protected]",密码:"ymfe.org"
初始化账号后提示的密码是错的,还好我猜出了默认密码是 yapi.pro
。
docker run --network mynetwork --rm -it -v $PWD/config.json:/yapi/config.json yapipro/yapi server/install.js
~
1.9.5
编辑图标重复
接口 ---> 编辑 ---> 返回数据设置
chrome
Windows
所有问题看这里就可以解决了,折腾了好久总结出来的:https://blog.opendeveloper.cn/yapi
~
v1.9.1
v1.9.2
v1.9.3
所有版本都有这个问题
~
点击编辑的时候,Body显示的不对(一直显示{"type":"object","title":"empty object","properties":{}}),预览是对的。点一下运行,再点回编辑就对了。
~
新建一个接口,然后选post请求,然后点击Body,点击raw,然后输入值,然后刷新页面。然后点击编辑的时候,Body显示的不对(一直显示{"type":"object","title":"empty object","properties":{}}),然后点击预览是对的。然后点一下运行,然后再点回编辑Body显示就又对了。
点击导出html或者markdown,Body内容都是空的,导不出来
~
Chrome 版本 92.0.4515.107(正式版本) (64 位)
Windows
~ 官网注册账号试玩
~
接口配置参数时,当VALUE包含“+”时,在运行时会被转译成“%2B”,从而导致报错400。
如InfluxDB带的接口:http://XXXX/query?q=SHOW+DATABASES&db=_internal
1、添加接口时,配置的path为:query
2、编辑时分别配置参数:q:SHOW+DATABASES db:_internal后保存。
3、运行的时候,抓包可以看到“+”号被转译成了“#2B”,导致报错400。
从期望说看,这里不转译更完美。
chrome
macOS
做二次开发,14版本会报错,请问目前支持的最高版本是哪个,谢谢!
~ all
~ all
~ all
~ all
all
~
1.9.5
~
点击自己的项目后,再选择接口,直接跳转空白页.前端调用接口也无效
~
点击自己的项目后,再选择接口
~
谷歌
win
docker 1.9.5
运行在 arm 架构的服务器上时,运行报错
Fatal process OOM in insufficient memory to create an Isolate
docker run -d --name yapi --restart always yapipro/yapi server/app.js
x
[root@miacis-h0 YApi]# uname -a
Linux miacis-hw-00 4.18.0-80.7.2.el7.aarch64 #1 SMP Thu Sep 12 16:13:20 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux
[root@miacis-h0 YApi]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (AltArch)
~
~
~
~
1.9.5
如题,希望完善权限设置。
对于单个接口查看时,能否对于“运行”功能加上权限,游客只可访问查看该接口,但是不能运行。
以防止游客误操作该接口导致系统出问题。
创建用户,该用户对于该接口/项目权限设置为“游客”
Chrome
macOS
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.