mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
Merge branch 'dev' into doc
This commit is contained in:
commit
cce7d5c328
57
CHANGELOG.md
57
CHANGELOG.md
@ -1,24 +1,47 @@
|
||||
## 1.2.0
|
||||
### v1.2.4
|
||||
#### Bug Fixed
|
||||
1. 期望值输入时候换成字符串,导致diff时因类型不一致匹配不上
|
||||
2. swagger 导入数据时出现的 id 未定义bug
|
||||
3. fix: kerberos dependencies 导致安装依赖需要编译的问题
|
||||
4. 修复了高级 mock 期望过滤参数为空时匹配不到的 bug
|
||||
5. 将接口编辑页的保存按钮变成一直在窗口底部
|
||||
6. 修改需求文档中项目操作处修改项目中的接口测试a链接指向的网页错误问题
|
||||
7. 添加接口时重名,现在提示“已存在”,并在提示信息中告知用户删改接口的位置
|
||||
8. 已添加的成员,再次添加会提示“添加成功”,优化提示为已成功添加人数,和已存在人数
|
||||
9. 添加分组和修改分组时有个权限问题没有更新,切换列表才更新,该问题已解决
|
||||
10. 解决修改和删除公共分类名称处,在添加接口时,选择接口分类名称没有修改的问题
|
||||
|
||||
### Features
|
||||
#### Feature
|
||||
1. 接口 path 支持了后面带 /
|
||||
2. cross-request支持了不安全的 header,如 cookie, referer...
|
||||
3. 支持了 path 带特殊符号"!"
|
||||
4. 请求参数可改变顺序,目前只是对必需和非必需进行自动排序
|
||||
5. 用户头像上传问题,txt改成jpg格式上传,用户头像显示空白,然后无法再次上传头像。无法再次上传的问题已经解决
|
||||
6. 解决用户头像改变但是header处图片不变的问题。问题描述:用户上传头像成功但是Header处的头像没有改变,并且点击其他页面后再回到个人中心里面的头像又变成没有重新上传时的图片,必须重新刷新才可以将Header处的图片更新
|
||||
7. 解决导入 postman 接口动态路由无法导入的 Bug
|
||||
|
||||
|
||||
### v1.2.0
|
||||
|
||||
#### Features
|
||||
* 增加高级 Mock 期望功能,根据设置的请求过滤规则,返回期望数据。
|
||||
* 增加统计功能
|
||||
* 增加自动化测试功能,写断言脚本,实现精准测试
|
||||
|
||||
### Bug Fixed
|
||||
#### Bug Fixed
|
||||
* 修复了切换集合环境的 Bug
|
||||
* 修复了 mockServer 拿不到 Post 请求 Body
|
||||
* 修复了接口调试 pathParams 无法使用 mock 参数和变量参数
|
||||
|
||||
## 1.1.2
|
||||
### v1.1.2
|
||||
|
||||
### Features
|
||||
#### Features
|
||||
* 接口运行增加了 query 和 body 的 enable 选项,可选择是否请求该字段
|
||||
* Mock 支持了时间戳占位符 @timestamp
|
||||
* 接口集运行页面可选择环境
|
||||
* 接口集动态参数格式由原来的 $.{key}.{jsonPath} 改为 $.{key}.{body|params}.{jsonPath}
|
||||
|
||||
### Bug Fixed
|
||||
#### Bug Fixed
|
||||
* 修复了接口集运行功能会忽略环境配置的 domain 路径
|
||||
* 修复了动态路由 mock 返回结果不是该接口定义返回数据
|
||||
* 修复了日志链接错误问题
|
||||
@ -29,13 +52,13 @@
|
||||
* 修复了接口用例页面修改 header 参数值没有效果 bug
|
||||
* 修复了接口集页面导入接口会导致 reqBody 清空 bug
|
||||
|
||||
## 1.1.1
|
||||
### Features
|
||||
### v1.1.1
|
||||
#### Features
|
||||
* 添加插件开发文档
|
||||
* 接口和测试用例可拖动
|
||||
* 优化动态提示
|
||||
|
||||
### Bug Fixed
|
||||
#### Bug Fixed
|
||||
* 修复接口状态将接口方法重置为 get
|
||||
* 环境配置域名带 path 无效
|
||||
* 修复Swagger数据导入分类 bug
|
||||
@ -45,8 +68,8 @@
|
||||
* 修复了无法查看公共项目的Bug
|
||||
* 优化了部分样式和交互
|
||||
|
||||
## 1.1.0
|
||||
### Features
|
||||
### v1.1.0
|
||||
#### Features
|
||||
* 新增个人空间功能,拥有这个分组的全部权限,可以在这个分组里探索 YApi 的功能
|
||||
* 新增分组动态功能
|
||||
* 优化接口运行页面交互
|
||||
@ -54,9 +77,9 @@
|
||||
* 增加了 Swagger 数据导入功能
|
||||
|
||||
|
||||
## 1.0.2
|
||||
### v1.0.2
|
||||
|
||||
### Features
|
||||
#### Features
|
||||
* 网站改为100%布局
|
||||
* 优化搜索的提示
|
||||
* 支持了 queryPath
|
||||
@ -66,11 +89,9 @@
|
||||
* 增加复制接口功能
|
||||
* 在组长和开发者权限基础上,添加了 查看着 权限
|
||||
|
||||
### v1.0.1
|
||||
|
||||
|
||||
## 1.0.1
|
||||
|
||||
### Fix Bug
|
||||
#### Fix Bug
|
||||
|
||||
* 修改接口名字后,需要刷新页面左边的侧边栏才会显示正确的名字
|
||||
* mockJson 出现 null,mock 出现格式不对问题
|
||||
@ -81,7 +102,7 @@
|
||||
* 用例名称太长,导致无法使用删除功能
|
||||
* 别人知道项目id虽然没有权限,但能看到里面所有内容
|
||||
|
||||
### Features
|
||||
#### Features
|
||||
|
||||
* 接口备注集成了富文本编辑
|
||||
* 支持 har 协议的接口数据导入
|
||||
|
@ -33,7 +33,7 @@ function getLength(object) {
|
||||
|
||||
function Compare(objA, objB) {
|
||||
if (!isObj(objA) && !isObj(objB)){
|
||||
return objA === objB;
|
||||
return objA == objB;
|
||||
}
|
||||
if (!isObj(objA) || !isObj(objB)) return false;
|
||||
if (getLength(objA) != getLength(objB)) return false;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Button, Form, Input, Switch, Select, Icon, Modal, Col, Row, InputNumber, AutoComplete } from 'antd';
|
||||
import { Button, Form, Input, Switch, Select, Icon,message, Modal, Col, Row, InputNumber, AutoComplete } from 'antd';
|
||||
import { safeAssign } from '../../../client/common.js';
|
||||
import mockEditor from '../../../client/containers/Project/Interface/InterfaceList/mockEditor';
|
||||
import constants from '../../../client/constants/variable.js'
|
||||
@ -9,6 +9,7 @@ import { connect } from 'react-redux'
|
||||
|
||||
import './CaseDesModal.scss'
|
||||
require('brace/mode/text');
|
||||
const json5 = require('json5');
|
||||
|
||||
const Option = Select.Option;
|
||||
const FormItem = Form.Item;
|
||||
@ -128,10 +129,11 @@ export default class CaseDesModal extends Component {
|
||||
caseData.params = params;
|
||||
} else {
|
||||
try {
|
||||
caseData.params = JSON.parse(caseData.params)
|
||||
caseData.params = json5.parse(caseData.params)
|
||||
} catch (error) {
|
||||
caseData.params = {}
|
||||
console.log(error)
|
||||
message.error('请求参数 json 格式有误,请修改')
|
||||
return false;
|
||||
}
|
||||
}
|
||||
delete caseData.paramsArr;
|
||||
@ -201,7 +203,7 @@ export default class CaseDesModal extends Component {
|
||||
})
|
||||
} else if (constants.HTTP_METHOD[method.toUpperCase()].request_body && req_body_type === 'json') {
|
||||
try {
|
||||
const bodyObj = JSON.parse(req_body_other)
|
||||
const bodyObj = json5.parse(req_body_other)
|
||||
keys = keys.concat(Object.keys(bodyObj))
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
@ -367,16 +369,6 @@ export default class CaseDesModal extends Component {
|
||||
this.setState({ paramsForm: bool ? 'json' : 'form' })
|
||||
}}
|
||||
/>
|
||||
{
|
||||
// <RadioGroup
|
||||
// value={paramsForm}
|
||||
// size="small"
|
||||
// onChange={e => this.setState({ paramsForm: e.target.value })}
|
||||
// >
|
||||
// <RadioButton value="form">Form</RadioButton>
|
||||
// <RadioButton value="json">JSON</RadioButton>
|
||||
// </RadioGroup>
|
||||
}
|
||||
</Col>
|
||||
</Row>
|
||||
{
|
||||
@ -437,7 +429,7 @@ export default class CaseDesModal extends Component {
|
||||
<Icon type="plus" /> 添加 HTTP 头
|
||||
</Button>
|
||||
</FormItem>
|
||||
<FormItem {...formItemLayout} wrapperCol={{ span: 17 }} label="返回 JSON" required>
|
||||
<FormItem {...formItemLayout} wrapperCol={{ span: 17 }} label="Body" required>
|
||||
<div id="res_body_json" style={{
|
||||
minHeight: "300px",
|
||||
border: "1px solid #d9d9d9",
|
||||
|
@ -45,6 +45,9 @@ export default class MockCol extends Component {
|
||||
}
|
||||
|
||||
handleOk = async (caseData) => {
|
||||
if(!caseData){
|
||||
return null;
|
||||
}
|
||||
const { caseData: currcase } = this.state;
|
||||
const interface_id = this.props.match.params.actionId;
|
||||
const project_id = this.props.match.params.id;
|
||||
|
@ -87,6 +87,11 @@ class advMockController extends baseController{
|
||||
if(!params.project_id){
|
||||
return ctx.body =yapi.commons.resReturn(null, 408, '缺少project_id');
|
||||
}
|
||||
|
||||
if(!params.res_body){
|
||||
return ctx.body =yapi.commons.resReturn(null, 408, '请输入 Response Body');
|
||||
}
|
||||
|
||||
let data = {
|
||||
interface_id: params.interface_id,
|
||||
project_id: params.project_id,
|
||||
@ -98,7 +103,7 @@ class advMockController extends baseController{
|
||||
delay: params.delay || 0,
|
||||
headers: params.headers || [],
|
||||
up_time: yapi.commons.time(),
|
||||
res_body: params.res_body || '',
|
||||
res_body: params.res_body,
|
||||
ip: params.ip
|
||||
}
|
||||
|
||||
|
@ -9,9 +9,11 @@ const lib = require(path.resolve(yapi.WEBROOT, 'common/lib.js' ));
|
||||
const Mock = require('mockjs');
|
||||
|
||||
function arrToObj(arr){
|
||||
let obj = {};
|
||||
let obj = {'Set-Cookie': []};
|
||||
arr.forEach(item=>{
|
||||
obj[item.name] = item.value;
|
||||
if(item.name === 'Set-Cookie'){
|
||||
obj['Set-Cookie'].push(item.value);
|
||||
}else obj[item.name] = item.value;
|
||||
})
|
||||
return obj;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
import {message} from 'antd'
|
||||
import URL from 'url';
|
||||
|
||||
function json_format(json){
|
||||
try{
|
||||
@ -12,16 +13,7 @@ function json_format(json){
|
||||
function postman(importDataModule){
|
||||
|
||||
function parseUrl(url){
|
||||
let parser = document.createElement('a');
|
||||
parser.href = url;
|
||||
return {
|
||||
protocol: parser.protocol,
|
||||
hostname: parser.hostname,
|
||||
port: parser.port,
|
||||
pathname: parser.pathname,
|
||||
search: parser.search,
|
||||
host: parser.host
|
||||
}
|
||||
return URL.parse(url)
|
||||
}
|
||||
|
||||
function checkInterRepeat(interData){
|
||||
@ -78,14 +70,20 @@ function postman(importDataModule){
|
||||
}
|
||||
|
||||
function handlePath(path){
|
||||
path = path.replace(/{{(\w*)}}/,"");
|
||||
path = parseUrl(path).pathname;
|
||||
if(path.charAt(0) != "/"){
|
||||
path = decodeURIComponent(path);
|
||||
if(!path) return '';
|
||||
|
||||
path = path.replace(/{{\w*}}/g, '');
|
||||
path = path.replace(/{(\w*)}/,function(data, match){
|
||||
if(match){
|
||||
return ':' + match;
|
||||
}
|
||||
return '';
|
||||
});
|
||||
if(path[0] != "/"){
|
||||
path = "/" + path;
|
||||
}
|
||||
if(path.charAt(path.length-1) === "/"){
|
||||
path = path.substr(0,path.length-1);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
|
@ -1,19 +1,11 @@
|
||||
|
||||
import {message} from 'antd'
|
||||
import URL from 'url';
|
||||
|
||||
function postman(importDataModule){
|
||||
|
||||
function parseUrl(url){
|
||||
let parser = document.createElement('a');
|
||||
parser.href = url;
|
||||
return {
|
||||
protocol: parser.protocol,
|
||||
hostname: parser.hostname,
|
||||
port: parser.port,
|
||||
pathname: parser.pathname,
|
||||
search: parser.search,
|
||||
host: parser.host
|
||||
}
|
||||
return URL.parse(url)
|
||||
}
|
||||
|
||||
function checkInterRepeat(interData){
|
||||
@ -72,14 +64,20 @@ function postman(importDataModule){
|
||||
}
|
||||
|
||||
function handlePath(path){
|
||||
path = path.replace(/{{(\w*)}}/,"");
|
||||
path = parseUrl(path).pathname;
|
||||
if(path.charAt(0) != "/"){
|
||||
path = decodeURIComponent(path);
|
||||
if(!path) return '';
|
||||
|
||||
path = path.replace(/{{\w*}}/g, '');
|
||||
path = path.replace(/{(\w*)}/,function(data, match){
|
||||
if(match){
|
||||
return ':' + match;
|
||||
}
|
||||
return '';
|
||||
});
|
||||
if(path[0] != "/"){
|
||||
path = "/" + path;
|
||||
}
|
||||
if(path.charAt(path.length-1) === "/"){
|
||||
path = path.substr(0,path.length-1);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,17 @@ function matchApi(apiPath, apiRule) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function parseCookie(str){
|
||||
if(!str || typeof str !== 'string'){
|
||||
return str;
|
||||
}
|
||||
if(str.split(';')[0]){
|
||||
let c = str.split(';')[0].split('=');
|
||||
return {name: c[0], value: c[1] || ''}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function handleCorsRequest(ctx) {
|
||||
let header = ctx.request.header;
|
||||
ctx.set('Access-Control-Allow-Origin', header.origin);
|
||||
@ -169,7 +180,26 @@ module.exports = async (ctx, next) => {
|
||||
await handleMock;
|
||||
if (context.resHeader && typeof context.resHeader === 'object') {
|
||||
for (let i in context.resHeader) {
|
||||
ctx.set(i, context.resHeader[i]);
|
||||
let cookie;
|
||||
if(i === 'Set-Cookie'){
|
||||
if(context.resHeader[i] && typeof context.resHeader[i] === 'string'){
|
||||
cookie = parseCookie(context.resHeader[i]);
|
||||
if(cookie && typeof cookie === 'object'){
|
||||
ctx.cookies.set(cookie.name, cookie.value, {
|
||||
maxAge: 864000000
|
||||
});
|
||||
}
|
||||
}else if(context.resHeader[i] && Array.isArray(context.resHeader[i])){
|
||||
context.resHeader[i].forEach(item=>{
|
||||
cookie = parseCookie(item);
|
||||
if(cookie && typeof cookie === 'object'){
|
||||
ctx.cookies.set(cookie.name, cookie.value, {
|
||||
maxAge: 864000000
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}else ctx.set(i, context.resHeader[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,6 @@ extConfig.forEach(plugin => {
|
||||
}
|
||||
let pluginModule = require(yapi.path.join(plugin_system_path, 'yapi-plugin-' + plugin.name + '/server.js'));
|
||||
pluginModule.call(yapi, plugin.options)
|
||||
yapi.commons.log('init plugins success...')
|
||||
})
|
||||
|
||||
//delete bindHook方法,避免误操作
|
||||
|
@ -448,14 +448,19 @@ for(let ctrl in routerConfig){
|
||||
function createAction(routerController, action, path, method) {
|
||||
router[method]("/api" + path, async (ctx) => {
|
||||
let inst = new routerController(ctx);
|
||||
|
||||
await inst.init(ctx);
|
||||
|
||||
if (inst.$auth === true) {
|
||||
await inst[action].call(inst, ctx);
|
||||
} else {
|
||||
ctx.body = yapi.commons.resReturn(null, 40011, '请登录...');
|
||||
}
|
||||
try{
|
||||
await inst.init(ctx);
|
||||
|
||||
if (inst.$auth === true) {
|
||||
await inst[action].call(inst, ctx);
|
||||
} else {
|
||||
ctx.body = yapi.commons.resReturn(null, 40011, '请登录...');
|
||||
}
|
||||
}catch(err){
|
||||
ctx.body = yapi.commons.resReturn(null, 40011, '服务器出错...');
|
||||
yapi.commons.log(err, 'error')
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -96,103 +96,33 @@
|
||||
<div class="content-left staticsidenav" role="complementary">
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="#1.2.0">1.2.0</a>
|
||||
</li>
|
||||
|
||||
<ul class="nav docs-sidenav-extend" >
|
||||
|
||||
|
||||
<li >
|
||||
<a href="#Features">Features</a>
|
||||
<a href="#v1.2.4">v1.2.4</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#Bug Fixed">Bug Fixed</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="#1.1.2">1.1.2</a>
|
||||
</li>
|
||||
|
||||
<ul class="nav docs-sidenav-extend" >
|
||||
|
||||
<li >
|
||||
<a href="#Features">Features</a>
|
||||
<a href="#v1.2.0">v1.2.0</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#Bug Fixed">Bug Fixed</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="#1.1.1">1.1.1</a>
|
||||
</li>
|
||||
|
||||
<ul class="nav docs-sidenav-extend" >
|
||||
|
||||
<li >
|
||||
<a href="#Features">Features</a>
|
||||
<a href="#v1.1.2">v1.1.2</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#Bug Fixed">Bug Fixed</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="#1.1.0">1.1.0</a>
|
||||
</li>
|
||||
|
||||
<ul class="nav docs-sidenav-extend" >
|
||||
|
||||
<li >
|
||||
<a href="#Features">Features</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="#1.0.2">1.0.2</a>
|
||||
</li>
|
||||
|
||||
<ul class="nav docs-sidenav-extend" >
|
||||
|
||||
<li >
|
||||
<a href="#Features">Features</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="#1.0.1">1.0.1</a>
|
||||
</li>
|
||||
|
||||
<ul class="nav docs-sidenav-extend" >
|
||||
|
||||
<li >
|
||||
<a href="#Fix Bug">Fix Bug</a>
|
||||
<a href="#v1.1.1">v1.1.1</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#Features">Features</a>
|
||||
<a href="#v1.1.0">v1.1.0</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#v1.0.2">v1.0.2</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#v1.0.1">v1.0.1</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@ -203,25 +133,29 @@
|
||||
|
||||
<div class="content-right markdown-body use-sidebar" role="main">
|
||||
|
||||
<h2 class="subject" id="1.2.0">1.2.0 <a class="hashlink" href="#1.2.0">#</a></h2><h3 class="subject" id="Features">Features <a class="hashlink" href="#Features">#</a></h3><ul>
|
||||
<h3 class="subject" id="v1.2.4">v1.2.4 <a class="hashlink" href="#v1.2.4">#</a></h3><h4 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h4><ol>
|
||||
<li>期望值输入时候换成字符串,导致diff时因类型不一致匹配不上</li><li>swagger 导入数据时出现的 id 未定义bug</li><li>fix: kerberos dependencies 导致安装依赖需要编译的问题</li><li>修复了高级 mock 期望过滤参数为空时匹配不到的 bug</li><li>将接口编辑页的保存按钮变成一直在窗口底部</li><li>修改需求文档中项目操作处修改项目中的接口测试a链接指向的网页错误问题</li><li>添加接口时重名,现在提示“已存在”,并在提示信息中告知用户删改接口的位置</li><li>已添加的成员,再次添加会提示“添加成功”,优化提示为已成功添加人数,和已存在人数</li><li>添加分组和修改分组时有个权限问题没有更新,切换列表才更新,该问题已解决</li><li>解决修改和删除公共分类名称处,在添加接口时,选择接口分类名称没有修改的问题</li></ol>
|
||||
<h4 class="subject" id="Feature">Feature <a class="hashlink" href="#Feature">#</a></h4><ol>
|
||||
<li>接口 path 支持了后面带 /</li><li>cross-request支持了不安全的 header,如 cookie, referer...</li><li>支持了 path 带特殊符号"!"</li><li>请求参数可改变顺序,目前只是对必需和非必需进行自动排序</li><li>用户头像上传问题,txt改成jpg格式上传,用户头像显示空白,然后无法再次上传头像。无法再次上传的问题已经解决</li><li>解决用户头像改变但是header处图片不变的问题。问题描述:用户上传头像成功但是Header处的头像没有改变,并且点击其他页面后再回到个人中心里面的头像又变成没有重新上传时的图片,必须重新刷新才可以将Header处的图片更新</li><li>解决导入 postman 接口动态路由无法导入的 Bug</li></ol>
|
||||
<h3 class="subject" id="v1.2.0">v1.2.0 <a class="hashlink" href="#v1.2.0">#</a></h3><h4 class="subject" id="Features">Features <a class="hashlink" href="#Features">#</a></h4><ul>
|
||||
<li>增加高级 Mock 期望功能,根据设置的请求过滤规则,返回期望数据。</li><li>增加统计功能</li><li>增加自动化测试功能,写断言脚本,实现精准测试</li></ul>
|
||||
<h3 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h3><ul>
|
||||
<h4 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h4><ul>
|
||||
<li>修复了切换集合环境的 Bug</li><li>修复了 mockServer 拿不到 Post 请求 Body</li><li>修复了接口调试 pathParams 无法使用 mock 参数和变量参数</li></ul>
|
||||
<h2 class="subject" id="1.1.2">1.1.2 <a class="hashlink" href="#1.1.2">#</a></h2><h3 class="subject" id="Features">Features <a class="hashlink" href="#Features">#</a></h3><ul>
|
||||
<h3 class="subject" id="v1.1.2">v1.1.2 <a class="hashlink" href="#v1.1.2">#</a></h3><h4 class="subject" id="Features">Features <a class="hashlink" href="#Features">#</a></h4><ul>
|
||||
<li>接口运行增加了 query 和 body 的 enable 选项,可选择是否请求该字段</li><li>Mock 支持了时间戳占位符 @timestamp</li><li>接口集运行页面可选择环境</li><li>接口集动态参数格式由原来的 $.{key}.{jsonPath} 改为 $.{key}.{body|params}.{jsonPath}</li></ul>
|
||||
<h3 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h3><ul>
|
||||
<h4 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h4><ul>
|
||||
<li>修复了接口集运行功能会忽略环境配置的 domain 路径</li><li>修复了动态路由 mock 返回结果不是该接口定义返回数据</li><li>修复了日志链接错误问题</li><li>修复了添加用户 loading 问题</li><li>修复了用户名编辑,前台未更新问题</li><li>修复了复制接口导致 GET 请求显示 request-body 问题</li><li>修复了接口集页面刷新后跳转到第一个接口集问题</li><li>修复了接口用例页面修改 header 参数值没有效果 bug</li><li>修复了接口集页面导入接口会导致 reqBody 清空 bug</li></ul>
|
||||
<h2 class="subject" id="1.1.1">1.1.1 <a class="hashlink" href="#1.1.1">#</a></h2><h3 class="subject" id="Features">Features <a class="hashlink" href="#Features">#</a></h3><ul>
|
||||
<h3 class="subject" id="v1.1.1">v1.1.1 <a class="hashlink" href="#v1.1.1">#</a></h3><h4 class="subject" id="Features">Features <a class="hashlink" href="#Features">#</a></h4><ul>
|
||||
<li>添加插件开发文档</li><li>接口和测试用例可拖动</li><li>优化动态提示</li></ul>
|
||||
<h3 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h3><ul>
|
||||
<h4 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h4><ul>
|
||||
<li>修复接口状态将接口方法重置为 get</li><li>环境配置域名带 path 无效</li><li>修复Swagger数据导入分类 bug</li><li>MockServer 支持 CORS 跨域</li><li>优化JSON-SCHEMA转化为JSON的逻辑,由原来随机转换不被required字段改为转换全部字段</li><li>修复了项目成员无法看到该项目的Bug</li><li>修复了无法查看公共项目的Bug</li><li>优化了部分样式和交互</li></ul>
|
||||
<h2 class="subject" id="1.1.0">1.1.0 <a class="hashlink" href="#1.1.0">#</a></h2><h3 class="subject" id="Features">Features <a class="hashlink" href="#Features">#</a></h3><ul>
|
||||
<h3 class="subject" id="v1.1.0">v1.1.0 <a class="hashlink" href="#v1.1.0">#</a></h3><h4 class="subject" id="Features">Features <a class="hashlink" href="#Features">#</a></h4><ul>
|
||||
<li>新增个人空间功能,拥有这个分组的全部权限,可以在这个分组里探索 YApi 的功能</li><li>新增分组动态功能</li><li>优化接口运行页面交互</li><li>CrossRequest 扩展支持 https</li><li>增加了 Swagger 数据导入功能</li></ul>
|
||||
<h2 class="subject" id="1.0.2">1.0.2 <a class="hashlink" href="#1.0.2">#</a></h2><h3 class="subject" id="Features">Features <a class="hashlink" href="#Features">#</a></h3><ul>
|
||||
<h3 class="subject" id="v1.0.2">v1.0.2 <a class="hashlink" href="#v1.0.2">#</a></h3><h4 class="subject" id="Features">Features <a class="hashlink" href="#Features">#</a></h4><ul>
|
||||
<li>网站改为100%布局</li><li>优化搜索的提示</li><li>支持了 queryPath</li><li>接口浏览页面和编辑页面交互</li><li>新增高级 Mock 功能,可通过 js 代码去控制 mock 数据的生成</li><li>测试集支持了自动化测试</li><li>增加复制接口功能</li><li>在组长和开发者权限基础上,添加了 查看着 权限</li></ul>
|
||||
<h2 class="subject" id="1.0.1">1.0.1 <a class="hashlink" href="#1.0.1">#</a></h2><h3 class="subject" id="Fix_Bug">Fix Bug <a class="hashlink" href="#Fix_Bug">#</a></h3><ul>
|
||||
<h3 class="subject" id="v1.0.1">v1.0.1 <a class="hashlink" href="#v1.0.1">#</a></h3><h4 class="subject" id="Fix_Bug">Fix Bug <a class="hashlink" href="#Fix_Bug">#</a></h4><ul>
|
||||
<li>修改接口名字后,需要刷新页面左边的侧边栏才会显示正确的名字 </li><li>mockJson 出现 null,mock 出现格式不对问题 </li><li>没有权限的分组不可选 </li><li>项目列表图标设计大小优化下 </li><li>关注的项目不显眼 </li><li>添加接口之后,再次选择添加接口,会保留上次填写的信息 </li><li>用例名称太长,导致无法使用删除功能 </li><li>别人知道项目id虽然没有权限,但能看到里面所有内容 </li></ul>
|
||||
<h3 class="subject" id="Features">Features <a class="hashlink" href="#Features">#</a></h3><ul>
|
||||
<h4 class="subject" id="Features">Features <a class="hashlink" href="#Features">#</a></h4><ul>
|
||||
<li>接口备注集成了富文本编辑 </li><li>支持 har 协议的接口数据导入 </li></ul>
|
||||
|
||||
</div>
|
||||
|
@ -1 +1 @@
|
||||
window.WEBPACK_ASSETS = {"index.js":{"js":"index@76cbf4c764b0f89cd244.js","css":"index@76cbf4c764b0f89cd244.css"},"lib":{"js":"lib@b06dfa154a558e5f74a9.js"},"lib2":{"js":"lib2@70df7f142a741c00239e.js"},"manifest":{"js":"manifest@b67af9f8b578904e66c5.js"}}
|
||||
window.WEBPACK_ASSETS = {"index.js":{"js":"index@aeda4564fb6a9b08fa32.js","css":"index@aeda4564fb6a9b08fa32.css"},"lib":{"js":"lib@f6dd47c1f1d5bc6322ad.js"},"lib2":{"js":"lib2@dbcc326d4fe3e4473316.js"},"manifest":{"js":"manifest@b67af9f8b578904e66c5.js"}}
|
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
1
static/prd/index@aeda4564fb6a9b08fa32.css
Normal file
1
static/prd/index@aeda4564fb6a9b08fa32.css
Normal file
File diff suppressed because one or more lines are too long
BIN
static/prd/index@aeda4564fb6a9b08fa32.css.gz
Normal file
BIN
static/prd/index@aeda4564fb6a9b08fa32.css.gz
Normal file
Binary file not shown.
1
static/prd/index@aeda4564fb6a9b08fa32.js
Normal file
1
static/prd/index@aeda4564fb6a9b08fa32.js
Normal file
File diff suppressed because one or more lines are too long
BIN
static/prd/index@aeda4564fb6a9b08fa32.js.gz
Normal file
BIN
static/prd/index@aeda4564fb6a9b08fa32.js.gz
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
1
static/prd/lib2@dbcc326d4fe3e4473316.js
Normal file
1
static/prd/lib2@dbcc326d4fe3e4473316.js
Normal file
File diff suppressed because one or more lines are too long
BIN
static/prd/lib2@dbcc326d4fe3e4473316.js.gz
Normal file
BIN
static/prd/lib2@dbcc326d4fe3e4473316.js.gz
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
1
static/prd/lib@f6dd47c1f1d5bc6322ad.js
Normal file
1
static/prd/lib@f6dd47c1f1d5bc6322ad.js
Normal file
File diff suppressed because one or more lines are too long
BIN
static/prd/lib@f6dd47c1f1d5bc6322ad.js.gz
Normal file
BIN
static/prd/lib@f6dd47c1f1d5bc6322ad.js.gz
Normal file
Binary file not shown.
@ -152,4 +152,15 @@ test('isDeepMatch', t=>{
|
||||
|
||||
test('isDeepMatch', t=>{
|
||||
t.false(lib.isDeepMatch(undefined, {a:1}))
|
||||
})
|
||||
|
||||
test('isDeepMatch', t=>{
|
||||
t.true(lib.isDeepMatch({ t: 1,
|
||||
b: '2',
|
||||
ip: '127.0.0.1',
|
||||
interface_id: 1857,
|
||||
ip_enable: true,
|
||||
params: { a: 'x', b: 'y' },
|
||||
res_body: '111',
|
||||
code: 1 }, {t:'1'}))
|
||||
})
|
Loading…
Reference in New Issue
Block a user