mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-24 13:14:16 +08:00
Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
This commit is contained in:
commit
f79244e7a1
@ -65,9 +65,37 @@
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content " id="readme">
|
||||
<div class="ydoc-container-content ">
|
||||
|
||||
|
||||
<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.1_项目分组">1.1 项目分组</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="#1.2_项目">1.2 项目</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="#1.3_接口">1.3 接口</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="content-right markdown-body use-sidebar" role="main">
|
||||
|
||||
<article class="markdown-body">
|
||||
<h2 class="subject" id="快速开始">快速开始 <a class="hashlink" href="#快速开始">#</a></h2><h3 class="subject" id="1_接口管理架构">1 接口管理架构 <a class="hashlink" href="#1_接口管理架构">#</a></h3><p>平台以<strong>项目分组</strong> -> <strong>项目</strong> -> <strong>接口</strong>的划分进行接口组织管理。</p>
|
||||
<p><img src="http://upload-images.jianshu.io/upload_images/842107-305ba49a60ee1ff5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" width = "800" style="margin:0px auto;display:block;" alt="图片名称" align=center /></p>
|
||||
<h4 class="subject" id="1.1_项目分组">1.1 项目分组 <a class="hashlink" href="#1.1_项目分组">#</a></h4><p>登录之后进到项目首页,左边侧边栏显示的即分组列表。</p>
|
||||
@ -90,7 +118,7 @@
|
||||
<p><img src="http://upload-images.jianshu.io/upload_images/842107-78c0ea839619d068.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" width = "800" style="margin:0px auto;display:block;" alt="图片名称" align=center /></p>
|
||||
<p><img src="http://upload-images.jianshu.io/upload_images/842107-2ee7171d707e91ff.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" width = "800" style="margin:0px auto;display:block;" alt="图片名称" align=center /></p>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -105,6 +133,9 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="open-panel"></div>
|
||||
<div class="mask"></div>
|
||||
|
||||
|
||||
<script src="source/main.js"></script>
|
||||
<script src="source/app.js"></script>
|
||||
|
@ -65,10 +65,24 @@
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content " id="readme">
|
||||
<div class="ydoc-container-content">
|
||||
|
||||
<article class="markdown-body">
|
||||
<h3 class="subject" id="Mock功能">Mock功能 <a class="hashlink" href="#Mock功能">#</a></h3> <p style='text-indent:2em;line-height:1.8em'>yapi的Mock功能可以根据用户的输入接口信息如协议、URL、接口名、请求头、请求参数、mock规则(<a href="#mock">点击到Mock规则</a>)生成Mock接口,这些接口会自动生成模拟数据,支持复杂的生成逻辑,创建者可以自由构造需要的数据。而且与常见的Mock方式如将Mock写在代码里和JS拦截等相比yapi的Mock在使用场景和效率和复杂度上是相差甚远的,正是由于yapi的Mock是一个第三方平台那么在 团队开发时任何人都可以权限许可下创建、修改接口信息等操作,这对于团队开发是很有好处的。</p>
|
||||
|
||||
|
||||
<div class="content-left staticsidenav" role="complementary">
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="content-right right markdown-body use-sidebar" role="main">
|
||||
|
||||
<div class="docs-section">
|
||||
|
||||
<div>
|
||||
<h3 class="subject" id="Mock功能">Mock功能 <a class="hashlink" href="#Mock功能">#</a></h3> <p style='text-indent:2em;line-height:1.8em'>yapi的Mock功能可以根据用户的输入接口信息如协议、URL、接口名、请求头、请求参数、mock规则(<a href="#mock">点击到Mock规则</a>)生成Mock接口,这些接口会自动生成模拟数据,支持复杂的生成逻辑,创建者可以自由构造需要的数据。而且与常见的Mock方式如将Mock写在代码里和JS拦截等相比yapi的Mock在使用场景和效率和复杂度上是相差甚远的,正是由于yapi的Mock是一个第三方平台那么在 团队开发时任何人都可以权限许可下创建、修改接口信息等操作,这对于团队开发是很有好处的。</p>
|
||||
|
||||
<h4 class="subject" id="1_Mock步骤">1 Mock步骤 <a class="hashlink" href="#1_Mock步骤">#</a></h4><h5 class="subject" id="1.1_创建接口">1.1 创建接口 <a class="hashlink" href="#1.1_创建接口">#</a></h5><p>通过点击页面上的"+添加接口"(若是接口已存在则跳到 1.2 )</p>
|
||||
<p><img src="http://note.youdao.com/yws/api/personal/file/WEB613bd4f29db038f2b41c03dcfceda2b6?method=download&shareKey=29bfc2b855f6f26ce0079baf567e54cc" width = "800" style="margin:0px auto;display:block;" alt="图片名称" align=center /></p>
|
||||
@ -217,7 +231,11 @@ Mock.mock(<span class="token punctuation">{</span>
|
||||
</code></pre><h2 class="subject" id="未来计划推出功能">未来计划推出功能 <a class="hashlink" href="#未来计划推出功能">#</a></h2><ol>
|
||||
<li>可视化JSON编辑器,可定义JSON_Schema和mockjs</li><li>支持HTTP和RPC协议</li><li>自动化测试</li><li>多人协作</li></ol>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -232,6 +250,9 @@ Mock.mock(<span class="token punctuation">{</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="open-panel"></div>
|
||||
<div class="mask"></div>
|
||||
|
||||
|
||||
<script src="source/main.js"></script>
|
||||
<script src="source/app.js"></script>
|
||||
|
15
ydoc.json
15
ydoc.json
@ -12,7 +12,10 @@
|
||||
"homeUrl": "http://ued.qunar.com/ymfe/" // logourl
|
||||
},
|
||||
"options": {
|
||||
"foldcode": true
|
||||
"foldcode": true,
|
||||
"markdown": { // 对于 markdown 编译器进行统一配置
|
||||
"menuLevel": 4 //选取第几级 head 作为目录,默认 -1 没有目录
|
||||
}
|
||||
},
|
||||
"pages": [{
|
||||
"name": "index", // Page Name 会根据他生成 html 文件,例: index.html
|
||||
@ -69,7 +72,14 @@
|
||||
"title": "YApi",
|
||||
"description": "高效、易用、功能强大、的api管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。"
|
||||
},
|
||||
"content": "./README/README-mock.md" // 内容(这里以markdown文件举例)
|
||||
"content": {
|
||||
"sidebar": true,
|
||||
"blocks": [{
|
||||
"name":"",
|
||||
"content": "./README/README-mock.md" // 内容(这里以markdown文件举例)
|
||||
}]
|
||||
}
|
||||
|
||||
},{
|
||||
"name": "api",
|
||||
"title": "",
|
||||
@ -82,6 +92,7 @@
|
||||
"type": "interface", // 类型,可选 component 和 lib,默认 component
|
||||
"source": true, // 是否生成源文件预览,默认 false
|
||||
"categories":["group","user","project", "interface"]
|
||||
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user