yapi/static/doc/usage-接口操作.html

217 lines
9.4 KiB
HTML
Raw Normal View History

2017-09-04 11:50:36 +08:00
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta name="format-detection" content="telephone=no,email=no" />
<meta http-equiv="X-UA-Compatible" content="ie=edge, chrome=1">
<meta name="description" content="description of your site">
<meta name="author" content="author of the site">
<title>YApi 使用手册</title>
<link rel="stylesheet" href="source/main.css" />
2017-09-04 11:50:36 +08:00
</head>
<body>
<div class="ydoc">
<header class="ydoc-header">
<div class="ydoc-header-area">
<a href="http://ued.qunar.com/ymfe/" class="navbar-brand">YMFE</a>
<button class="ydocIcon navbar-toggle">&#xf020;</button>
<nav class="ydoc-nav">
<ul class="navbar-left">
<li class="">
<a href="index.html">首页</a>
</li>
<li class="active">
<a href="usage.html">使用手册</a>
</li>
<li class="">
<a href="manage.html">管理学院</a>
</li>
<li class="">
<a href="api.html"></a>
</li>
</ul>
</nav>
</div>
</header>
<!-- <header style="height:20px"></header> -->
<!-- Docs page layout -->
<div class="ydoc-banner-bg">
<div class="ydoc-banner ">
<div class="ydoc-banner-area">
<h1 >YApi</h1>
<p class="desc ">高效、易用、功能强大的api管理平台旨在为开发、产品、测试人员提供更优雅的接口管理服务。</p>
</div>
</div>
<div class="ydoc-container">
<div class="ydoc-container-content">
2017-09-04 11:50:36 +08:00
<div class="content-left " role="complementary">
2017-09-04 11:50:36 +08:00
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
<ul class="nav docs-sidenav">
<!-- <li > -->
<li >
<a href="usage-认识 YApi.html">认识 YApi</a>
</li>
<!-- <li > -->
<li >
<a href="usage-创建第一个API.html">创建第一个API</a>
</li>
<!-- <li > -->
<li >
2017-09-06 15:40:45 +08:00
<a href="usage-管理分组与项目.html">管理分组与项目</a>
</li>
<!-- <li > -->
<li >
<a href="usage-项目操作.html">项目操作</a>
2017-09-04 11:50:36 +08:00
</li>
<!-- <li class="active" class="active" > -->
<li class="active" >
2017-09-06 15:40:45 +08:00
<a href="usage-接口操作.html">接口操作</a>
2017-09-04 11:50:36 +08:00
</li>
<ul class="nav docs-sidenav-extend" >
<li >
<a href="#介绍">介绍</a>
</li>
<li >
2017-09-05 11:16:06 +08:00
<a href="#接口配置">接口配置</a>
</li>
<li >
<a href="#接口调试">接口调试</a>
2017-09-04 11:50:36 +08:00
</li>
</ul>
<!-- <li > -->
<li >
<a href="usage-使用mock功能.html">使用mock功能</a>
</li>
<!-- <li > -->
<li >
<a href="usage-使用测试集.html">使用测试集</a>
</li>
</ul>
</nav>
</div>
<div class="content-right markdown-body " role="main">
2017-09-04 11:50:36 +08:00
2017-09-06 20:23:47 +08:00
<h2 class="subject" id="介绍">介绍 <a class="hashlink" href="#介绍">#</a></h2><h2 class="subject" id="接口配置">接口配置 <a class="hashlink" href="#接口配置">#</a></h2><p><a href="./usage-创建第一个API.html#新建_编辑接口">新建接口</a> 后,点击新添加的接口,右侧可以看到接口的预览信息,点击右侧的 <code>编辑</code> Tab项进入编辑面板。</p>
<p>在改面板中你可以看到接口的基本信息(接口名称、分类、路径),除此以外,你还可以完善以下接口信息:</p>
<ul>
<li>状态: 用于标识接口是否开发完成。</li><li>接口描述: 用简短的文字描述接口的作用。</li><li>query: 接口url的查询字符串。</li><li>请求 Headers: http 请求头字段。</li><li>请求 Body: http 请求 body 部分。</li><li>请求 Body: http 请求 body 部分。</li><li><p>响应 Body: 模拟返回结果。</p>
<blockquote>
<p>响应 Body 分为 <code>json</code> &amp; <code>raw</code> 两种形式</p>
</blockquote>
</li><li><p>是否开启邮件通知:开启后将此次接口的改动以邮件的形式发送至项目组所有成员。</p>
</li></ul>
<h2 class="subject" id="接口调试">接口调试 <a class="hashlink" href="#接口调试">#</a></h2><!-- 点击运行tab,可进入到接口测试页面,首先安装chrome crossRequest扩展才可正常使用此功能
2017-09-06 10:36:11 +08:00
<img src="./images/interface_run.png" width="800" style="margin:0px auto;display:block;" alt="图片名称" align=center />
2017-09-06 20:23:47 +08:00
点击保存按钮可把当前测试保存到测试集,方便下次调试 -->
2017-09-04 11:50:36 +08:00
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="copyright">
&copy; 2016 <a href="http://ued.qunar.com/ymfe/">YMFE</a> Team. Build by <a href="http://ued.qunar.com/ydoc/">ydoc</a>.
</div>
</footer>
</div>
<div class="open-panel"></div>
<div class="mask"></div>
<script src="source/main.js"></script>
<script src="source/app.js"></script>
<script>
var lineHeight = 17.4;
2017-09-04 11:50:36 +08:00
var EXAMPLE_MAX_HEIGHT;
function fold() {
// 折叠code
$('.markdown-body pre').css({
"line-height": lineHeight + "px"
});
$('.markdown-body pre').map(function(i, item) {
var $item = $(item);
var foldnumber = $item.data('foldnumber');
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
if ($item.height() > EXAMPLE_MAX_HEIGHT) {
$item.css({
"padding-bottom": 30
});
$item.find('code').height(EXAMPLE_MAX_HEIGHT);
$item.append('<span class="extend">展开更多……</span>');
};
});
$('.ydoc-example').delegate('.extend', 'click', function() {
var $this = $(this);
$this.removeClass('extend').addClass('fold');
$this.html('折叠代码');
$this.prev().height('auto');
$this.prev().parent().height('auto');
2017-09-04 11:50:36 +08:00
});
$('.ydoc-example').delegate('.fold', 'click', function() {
var $this = $(this);
var foldnumber = $this.parent().data('foldnumber');
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
$this.removeClass('fold').addClass('extend');
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
2017-09-04 11:50:36 +08:00
$this.html("展开更多……");
});
}
$(document).ready(fold);
</script>
</body>
</html>