mirror of
https://github.com/YMFE/yapi.git
synced 2025-04-06 15:00:26 +08:00
feat: add version
This commit is contained in:
parent
9901910d10
commit
5ea1bf88f8
12
CHANGELOG.md
12
CHANGELOG.md
@ -1,3 +1,15 @@
|
||||
### v1.2.6
|
||||
|
||||
#### Bug Fixed
|
||||
1. 修复路径参数无法删除
|
||||
|
||||
#### Feature
|
||||
1. 参数值支持多个动态参数,类似 str{@email}str{$.55.body.id}
|
||||
2. 参数值支持管道表达式,例如 {@email | concat: pass | md5 | substr: 1,10}
|
||||
3. 接口编辑参数**可拖动排序**
|
||||
4. 修复路径参数无法删除问题
|
||||
|
||||
|
||||
### v1.2.5
|
||||
#### Bug Fixed
|
||||
1. 成员如果第一次添加成员时选择组长,接着再添加下一个成员,如果select是默认的开发者,这时候会出现与上次select相同的值
|
||||
|
@ -143,13 +143,22 @@ class InterfaceEditForm extends Component {
|
||||
if (this.state.res_body && validJson(this.state.res_body) === false) {
|
||||
return message.error('返回body json格式有问题,请检查!')
|
||||
}
|
||||
values.res_body = this.state.res_body;
|
||||
try{
|
||||
values.res_body = JSON.stringify(JSON.parse(this.state.res_body), null, ' ')
|
||||
}catch(e){
|
||||
values.res_body = this.state.res_body;
|
||||
}
|
||||
|
||||
}
|
||||
if (values.req_body_type === 'json') {
|
||||
if (this.state.req_body_other && validJson(this.state.req_body_other) === false) {
|
||||
return message.error('响应Body json格式有问题,请检查!');
|
||||
}
|
||||
values.req_body_other = this.state.req_body_other;
|
||||
try{
|
||||
values.req_body_other = JSON.stringify(JSON.parse(this.state.req_body_other), null, ' ');
|
||||
}catch(e){
|
||||
values.req_body_other = this.state.req_body_other
|
||||
}
|
||||
}
|
||||
|
||||
values.method = this.state.method;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yapi",
|
||||
"version": "1.2.5",
|
||||
"version": "1.2.6",
|
||||
"description": "YAPI",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -424,7 +424,9 @@ class userController extends baseController {
|
||||
|
||||
let userInst = yapi.getInst(userModel);
|
||||
let id = ctx.request.body.id;
|
||||
|
||||
if(id == this.getUid()){
|
||||
return ctx.body = yapi.commons.resReturn(null, 403, '禁止删除管理员');
|
||||
}
|
||||
if (!id) {
|
||||
return ctx.body = yapi.commons.resReturn(null, 400, 'uid不能为空');
|
||||
}
|
||||
|
@ -1642,7 +1642,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/user.js.html#439" target="_blank">./server/controllers/user.js:439</a>
|
||||
<a href="./static/server/controllers/user.js.html#441" target="_blank">./server/controllers/user.js:441</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -1734,7 +1734,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/user.js.html#508" target="_blank">./server/controllers/user.js:508</a>
|
||||
<a href="./static/server/controllers/user.js.html#510" target="_blank">./server/controllers/user.js:510</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -1796,7 +1796,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/user.js.html#551" target="_blank">./server/controllers/user.js:551</a>
|
||||
<a href="./static/server/controllers/user.js.html#553" target="_blank">./server/controllers/user.js:553</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -1858,7 +1858,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/user.js.html#583" target="_blank">./server/controllers/user.js:583</a>
|
||||
<a href="./static/server/controllers/user.js.html#585" target="_blank">./server/controllers/user.js:585</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -1936,7 +1936,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/user.js.html#628" target="_blank">./server/controllers/user.js:628</a>
|
||||
<a href="./static/server/controllers/user.js.html#630" target="_blank">./server/controllers/user.js:630</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -3575,7 +3575,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/interface.js.html#191" target="_blank">./server/controllers/interface.js:191</a>
|
||||
<a href="./static/server/controllers/interface.js.html#189" target="_blank">./server/controllers/interface.js:189</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -3640,7 +3640,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/interface.js.html#234" target="_blank">./server/controllers/interface.js:234</a>
|
||||
<a href="./static/server/controllers/interface.js.html#232" target="_blank">./server/controllers/interface.js:232</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -3705,7 +3705,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/interface.js.html#332" target="_blank">./server/controllers/interface.js:332</a>
|
||||
<a href="./static/server/controllers/interface.js.html#330" target="_blank">./server/controllers/interface.js:330</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -3938,7 +3938,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/interface.js.html#541" target="_blank">./server/controllers/interface.js:541</a>
|
||||
<a href="./static/server/controllers/interface.js.html#535" target="_blank">./server/controllers/interface.js:535</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -4010,7 +4010,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/interface.js.html#739" target="_blank">./server/controllers/interface.js:739</a>
|
||||
<a href="./static/server/controllers/interface.js.html#733" target="_blank">./server/controllers/interface.js:733</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
@ -106,7 +106,7 @@
|
||||
|
||||
|
||||
|
||||
<p class="home-version">当前版本:v1.2.5</p>
|
||||
<p class="home-version">当前版本:v1.2.6</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
@ -102,6 +102,10 @@
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
<li >
|
||||
<a href="#v1.2.6">v1.2.6</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#v1.2.5">v1.2.5</a>
|
||||
</li>
|
||||
@ -142,8 +146,12 @@
|
||||
|
||||
<div class="content-right markdown-body use-sidebar" role="main">
|
||||
|
||||
<h3 class="subject" id="v1.2.5">v1.2.5 <a class="hashlink" href="#v1.2.5">#</a></h3><h4 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h4><ol>
|
||||
<li>成员如果第一次添加成员时选择组长,接着再添加下一个成员,如果select是默认的开发者,这时候会出现与上次select相同的值</li><li>如果添加了一个不存在的成员还是会提示添加成功,并且发送的数据是原来发送成功的数据,这里需要重置初始值并在未找到对应用户名时对未找到的人名应该提示用户不存在</li><li>测试集合中的左侧 Menu 拖动的时候右侧的List需要跟随变动</li><li>在接口开发阶段,多个人并行改接口,如果最后一个人改之前没刷新页面,会把之前的人修改过的都冲掉了</li><li>修复cross-request,response header字段重复bug</li><li>Fix 接口集自动化测试 header 没有解析 mock 和 变量参数</li></ol>
|
||||
<h3 class="subject" id="v1.2.6">v1.2.6 <a class="hashlink" href="#v1.2.6">#</a></h3><h4 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h4><ol>
|
||||
<li>修复路径参数无法删除</li></ol>
|
||||
<h4 class="subject" id="Feature">Feature <a class="hashlink" href="#Feature">#</a></h4><ol>
|
||||
<li>参数值支持多个动态参数,类似 str{@email}str{$.55.body.id}</li><li>参数值支持管道表达式,例如 {@email | concat: pass | md5 | substr: 1,10}</li><li>接口编辑参数<strong>可拖动排序</strong></li><li>修复路径参数无法删除问题</li></ol>
|
||||
<h3 class="subject" id="v1.2.5">v1.2.5 <a class="hashlink" href="#v1.2.5">#</a></h3><h4 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h4><ol>
|
||||
<li>成员如果第一次添加成员时选择组长,接着再添加下一个成员,如果select是默认的开发者,这时候会出现与上次select相同的值</li><li>如果添加了一个不存在的成员还是会提示添加成功,并且发送的数据是原来发送成功的数据,这里需要重置初始值并在未找到对应用户名时对未找到的人名应该提示用户不存在</li><li>Fix 接口集自动化测试 header 没有解析 mock 和 变量参数</li><li>在接口开发阶段,多个人并行改接口,如果最后一个人改之前没刷新页面,会把之前的人修改过的都冲掉了</li><li>修复cross-request,response header字段重复bug</li></ol>
|
||||
<h4 class="subject" id="Feature">Feature <a class="hashlink" href="#Feature">#</a></h4><ol>
|
||||
<li>优化了分组添加,编辑交互</li><li>cross-request 计算了接口请求时间</li><li>新增接口文档导出 html, markdown 功能</li></ol>
|
||||
<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>
|
||||
|
@ -149,13 +149,11 @@ class interfaceController extends baseController {
|
||||
};
|
||||
|
||||
if (!_.isUndefined(params.req_query)) {
|
||||
data.req_query = this.requiredSort(params.req_query);
|
||||
// data.req_query = params.req_query;
|
||||
data.req_query = params.req_query;
|
||||
}
|
||||
|
||||
if (!_.isUndefined(params.req_body_form)) {
|
||||
data.req_body_form = this.requiredSort(params.req_body_form);
|
||||
// data.req_body_form = params.req_body_form;
|
||||
data.req_body_form = params.req_body_form;
|
||||
}
|
||||
|
||||
if (params.path.indexOf(":") > 0) {
|
||||
@ -473,11 +471,10 @@ class interfaceController extends baseController {
|
||||
data.req_headers = params.req_headers;
|
||||
}
|
||||
|
||||
if (!_.isUndefined(params.req_body_form)) {
|
||||
data.req_body_form = this.requiredSort(params.req_body_form);
|
||||
// data.req_body_form = params.req_body_form;
|
||||
if (!_.isUndefined(params.req_body_form)) {
|
||||
data.req_body_form = params.req_body_form;
|
||||
}
|
||||
if (!_.isUndefined(params.req_params) && Array.isArray(params.req_params) && params.req_params.length > 0) {
|
||||
if (!_.isUndefined(params.req_params)) {
|
||||
if(Array.isArray(params.req_params) && params.req_params.length > 0){
|
||||
data.type = 'var'
|
||||
data.req_params = params.req_params;
|
||||
@ -485,13 +482,10 @@ class interfaceController extends baseController {
|
||||
data.type = 'static'
|
||||
data.req_params = [];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!_.isUndefined(params.req_query)) {
|
||||
// data.req_query = params.req_query;
|
||||
data.req_query = this.requiredSort(params.req_query);
|
||||
// console.log("req",this.requiredSort(params.req_query));
|
||||
data.req_query = params.req_query;
|
||||
}
|
||||
|
||||
if (!_.isUndefined(params.req_body_other)) {
|
||||
|
@ -451,7 +451,9 @@ class userController extends baseController {
|
||||
|
||||
let userInst = yapi.getInst(userModel);
|
||||
let id = ctx.request.body.id;
|
||||
|
||||
if(id == this.getUid()){
|
||||
return ctx.body = yapi.commons.resReturn(null, 403, '禁止删除管理员');
|
||||
}
|
||||
if (!id) {
|
||||
return ctx.body = yapi.commons.resReturn(null, 400, 'uid不能为空');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user