mirror of
https://github.com/YMFE/yapi.git
synced 2025-03-13 14:26:50 +08:00
docs: opti
This commit is contained in:
parent
4dfc0e4f36
commit
152d8deae6
@ -66,6 +66,7 @@ YApi 是<strong>高效</strong>、<strong>易用</strong>、<strong>功能强大
|
||||
* [zwjamnsss](https://github.com/amnsss)
|
||||
* [dwb1994](https://github.com/dwb1994)
|
||||
* [fungezi](https://github.com/fungezi)
|
||||
* [gaoxiaomumu](https://github.com/gaoxiaomumu)
|
||||
### License
|
||||
Apache Licene 2.0
|
||||
|
||||
|
@ -3146,7 +3146,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/project.js.html#622" target="_blank">./server/controllers/project.js:622</a>
|
||||
<a href="./static/server/controllers/project.js.html#624" target="_blank">./server/controllers/project.js:624</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -3248,7 +3248,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/project.js.html#683" target="_blank">./server/controllers/project.js:683</a>
|
||||
<a href="./static/server/controllers/project.js.html#685" target="_blank">./server/controllers/project.js:685</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
@ -228,7 +228,7 @@
|
||||
<span class="token punctuation">}</span>
|
||||
<span class="token punctuation">}</span>
|
||||
</code></pre><p>假设我们需要在 url 增加一个 token 参数,可以写如下自定义脚本:</p>
|
||||
<pre><code>context.query.token = context.utils.md5(context.pathanem + 'salt'<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
<pre><code>context.query.token = context.utils.md5(context.pathname + 'salt'<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
</code></pre><h3 class="subject" id="返回数据示例">返回数据示例 <a class="hashlink" href="#返回数据示例">#</a></h3><p>在上面的示例请求完成后,假设返回 responseBody={a:1},公共变量 context 包含以下属性:</p>
|
||||
<pre><code>context = <span class="token punctuation">{</span>
|
||||
pathname<span class="token operator">:</span> '/api/user'<span class="token punctuation">,</span>
|
||||
|
@ -102,6 +102,10 @@
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
<li >
|
||||
<a href="#v1.3.0">v1.3.0</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#v1.2.9">v1.2.9</a>
|
||||
</li>
|
||||
@ -158,7 +162,9 @@
|
||||
|
||||
<div class="content-right markdown-body use-sidebar" role="main">
|
||||
|
||||
<h3 class="subject" id="v1.2.9">v1.2.9 <a class="hashlink" href="#v1.2.9">#</a></h3><h4 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h4><ol>
|
||||
<h3 class="subject" id="v1.3.0">v1.3.0 <a class="hashlink" href="#v1.3.0">#</a></h3><h4 class="subject" id="Feature">Feature <a class="hashlink" href="#Feature">#</a></h4><ul>
|
||||
<li>yapi 默认集成 ldap 登录方式</li><li>yapi 做一个 sso 登录插件,基于现有的 qsso 改造成大多数公司可用的</li><li>环境设置支持全局 header</li><li>接口运行页面选择环境增加管理环境的弹层</li><li>接口集复制功能</li><li>接口运行支持加工运行前后的 request 和 response ,主要是处理加密的接口或各种 token 参数问题</li><li>自动化测试除提供自定义脚本外,还提供可视化表单形式验证一些数据,例如 statusCode、bodyContent </li><li>增加查看接口详细改动</li><li>支持接口运行页面 body 全屏编辑</li></ul>
|
||||
<h3 class="subject" id="v1.2.9">v1.2.9 <a class="hashlink" href="#v1.2.9">#</a></h3><h4 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h4><ol>
|
||||
<li>Api 路径兼容 postman {varible}</li><li>View Response Height 问题</li></ol>
|
||||
<h4 class="subject" id="Feature">Feature <a class="hashlink" href="#Feature">#</a></h4><ol>
|
||||
<li>新增克隆测试集功能</li><li>高级 Mock 期望支持 mockjs</li><li>pathname 允许只有一个 /</li></ol>
|
||||
|
@ -86,7 +86,7 @@ class projectController extends baseController {
|
||||
},
|
||||
addMember: {
|
||||
"*id": id,
|
||||
"*member_uid": member_uid,
|
||||
"*member_uids": member_uid,
|
||||
"role": role
|
||||
},
|
||||
delMember: {
|
||||
@ -600,8 +600,10 @@ class projectController extends baseController {
|
||||
|
||||
let projectData = await this.Model.get(id);
|
||||
|
||||
if ((params.basepath = this.handleBasepath(params.basepath)) === false) {
|
||||
return ctx.body = yapi.commons.resReturn(null, 401, 'basepath格式有误');
|
||||
if(params.basepath){
|
||||
if ((params.basepath = this.handleBasepath(params.basepath)) === false) {
|
||||
return ctx.body = yapi.commons.resReturn(null, 401, 'basepath格式有误');
|
||||
}
|
||||
}
|
||||
|
||||
if (projectData.name === params.name) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user