mirror of
https://github.com/YMFE/yapi.git
synced 2025-04-18 15:20:25 +08:00
fix: 修改公共header的样式
This commit is contained in:
parent
494986ec36
commit
ac72765235
@ -93,6 +93,7 @@ export default class Run extends Component {
|
||||
let header = [].concat(env[index].header);
|
||||
header.forEach(item => {
|
||||
if (!this.checkNameIsExistInArray(item.name, req_header)) {
|
||||
item.abled = true;
|
||||
req_header.push(item)
|
||||
}
|
||||
})
|
||||
@ -339,7 +340,7 @@ export default class Run extends Component {
|
||||
inputValue,
|
||||
hasPlugin } = this.state;
|
||||
|
||||
|
||||
console.log('req_headers', req_headers);
|
||||
|
||||
return (
|
||||
<div className="interface-test postman">
|
||||
@ -466,10 +467,11 @@ export default class Run extends Component {
|
||||
<span className="eq-symbol">=</span>
|
||||
<Input
|
||||
value={item.value}
|
||||
disabled={!!item.abled}
|
||||
className="value"
|
||||
onChange={e => this.changeParam('req_headers', e.target.value, index)}
|
||||
placeholder="参数值"
|
||||
addonAfter={<Icon type="edit" onClick={() => this.showModal(item.value, index, 'req_headers')} />}
|
||||
addonAfter={!item.abled && <Icon type="edit" onClick={() => this.showModal(item.value, index, 'req_headers')} />}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
@ -8,7 +8,7 @@ import { Tooltip, Icon, Button, Spin, Modal, message, Select, Switch } from 'ant
|
||||
import { fetchInterfaceColList, fetchCaseList, setColData } from '../../../../reducer/modules/interfaceCol'
|
||||
import HTML5Backend from 'react-dnd-html5-backend';
|
||||
import { DragDropContext } from 'react-dnd';
|
||||
import { json_parse, handleParamsValue } from '../../../../common.js'
|
||||
import { json_parse, handleParamsValue } from '../../../../common.js'
|
||||
import AceEditor from 'client/components/AceEditor/AceEditor';
|
||||
import * as Table from 'reactabular-table';
|
||||
import * as dnd from 'reactabular-dnd';
|
||||
@ -16,7 +16,7 @@ import * as resolve from 'table-resolver';
|
||||
import axios from 'axios'
|
||||
import CaseReport from './CaseReport.js'
|
||||
import _ from 'underscore'
|
||||
import { handleParams, crossRequest } from 'client/components/Postman/postmanLib.js'
|
||||
import { handleParams, crossRequest } from 'client/components/Postman/postmanLib.js'
|
||||
import { initCrossRequest } from 'client/components/Postman/CheckCrossInstall.js'
|
||||
|
||||
const Option = Select.Option;
|
||||
@ -85,6 +85,7 @@ class InterfaceColContent extends Component {
|
||||
};
|
||||
this.onRow = this.onRow.bind(this);
|
||||
this.onMoveRow = this.onMoveRow.bind(this);
|
||||
|
||||
}
|
||||
|
||||
async componentWillMount() {
|
||||
@ -99,9 +100,11 @@ class InterfaceColContent extends Component {
|
||||
let result = await this.props.fetchCaseList(currColId);
|
||||
if (result.payload.data.errcode === 0) {
|
||||
this.reports = handleReport(result.payload.data.colData.test_report);
|
||||
|
||||
}
|
||||
|
||||
this.props.setColData({ currColId: +currColId, isShowCol: true, isRander: false })
|
||||
|
||||
this.handleColdata(this.props.currCaseList)
|
||||
}
|
||||
|
||||
@ -118,23 +121,29 @@ class InterfaceColContent extends Component {
|
||||
}
|
||||
|
||||
handleColdata = (rows) => {
|
||||
rows = rows.map((item) => {
|
||||
// let newRows = JSON.parse(JSON.stringify(rows))
|
||||
let newRows = rows.slice();
|
||||
let env = this.props.currProject.env;
|
||||
console.log('env', env);
|
||||
|
||||
newRows = newRows.map((item) => {
|
||||
item.id = item._id;
|
||||
item._test_status = item.test_status;
|
||||
return item;
|
||||
})
|
||||
rows = rows.sort((n, o) => {
|
||||
newRows = newRows.sort((n, o) => {
|
||||
return n.index - o.index;
|
||||
})
|
||||
console.log('rows', newRows);
|
||||
this.setState({
|
||||
rows: rows
|
||||
rows: newRows
|
||||
})
|
||||
}
|
||||
|
||||
executeTests = async () => {
|
||||
for (let i = 0, l = this.state.rows.length, newRows, curitem; i < l; i++) {
|
||||
let { rows } = this.state;
|
||||
curitem = Object.assign({}, rows[i],{
|
||||
curitem = Object.assign({}, rows[i], {
|
||||
env: this.props.currProject.env,
|
||||
pre_script: this.props.currProject.pre_script,
|
||||
after_script: this.props.currProject.after_script
|
||||
@ -144,6 +153,7 @@ class InterfaceColContent extends Component {
|
||||
this.setState({
|
||||
rows: newRows
|
||||
})
|
||||
// console.log('newRows', newRows);
|
||||
let status = 'error', result;
|
||||
try {
|
||||
result = await this.handleTest(curitem);
|
||||
@ -181,10 +191,11 @@ class InterfaceColContent extends Component {
|
||||
let requestParams = {};
|
||||
let options = handleParams(interfaceData, this.handleValue, requestParams)
|
||||
|
||||
let result = { code: 400,
|
||||
msg: '数据异常',
|
||||
validRes: []
|
||||
};
|
||||
let result = {
|
||||
code: 400,
|
||||
msg: '数据异常',
|
||||
validRes: []
|
||||
};
|
||||
|
||||
|
||||
try {
|
||||
@ -197,13 +208,13 @@ class InterfaceColContent extends Component {
|
||||
res_body: res
|
||||
}
|
||||
|
||||
if(options.data && typeof options.data === 'object'){
|
||||
if (options.data && typeof options.data === 'object') {
|
||||
requestParams = {
|
||||
...requestParams,
|
||||
...options.data
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let validRes = [];
|
||||
// 弃用 mock 字段验证功能
|
||||
// if (res && typeof res === 'object') {
|
||||
@ -262,7 +273,7 @@ class InterfaceColContent extends Component {
|
||||
params: requestParams
|
||||
})
|
||||
if (test.data.errcode !== 0) {
|
||||
test.data.data.logs.forEach(item=>{
|
||||
test.data.data.logs.forEach(item => {
|
||||
validRes.push({
|
||||
message: item
|
||||
})
|
||||
@ -279,7 +290,7 @@ class InterfaceColContent extends Component {
|
||||
return handleParamsValue(val, this.records);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
arrToObj = (arr, requestParams) => {
|
||||
arr = arr || [];
|
||||
@ -339,7 +350,7 @@ class InterfaceColContent extends Component {
|
||||
index: index
|
||||
})
|
||||
})
|
||||
axios.post('/api/col/up_col_index', changes).then(()=>{
|
||||
axios.post('/api/col/up_col_index', changes).then(() => {
|
||||
this.props.fetchInterfaceColList(this.props.match.params.id)
|
||||
})
|
||||
if (rows) {
|
||||
@ -349,7 +360,7 @@ class InterfaceColContent extends Component {
|
||||
|
||||
async componentWillReceiveProps(nextProps) {
|
||||
let newColId = !isNaN(nextProps.match.params.actionId) ? +nextProps.match.params.actionId : 0;
|
||||
|
||||
|
||||
if (newColId && this.currColId && newColId !== this.currColId || nextProps.isRander) {
|
||||
this.currColId = newColId;
|
||||
await this.props.fetchCaseList(newColId);
|
||||
@ -379,7 +390,7 @@ class InterfaceColContent extends Component {
|
||||
})
|
||||
}
|
||||
|
||||
handleScriptChange = (d)=>{
|
||||
handleScriptChange = (d) => {
|
||||
this.setState({
|
||||
curScript: d.text
|
||||
})
|
||||
@ -428,6 +439,7 @@ class InterfaceColContent extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
// console.log('rows',this.state.rows);
|
||||
const columns = [{
|
||||
property: 'casename',
|
||||
header: {
|
||||
@ -442,7 +454,7 @@ class InterfaceColContent extends Component {
|
||||
formatters: [
|
||||
(text, { rowData }) => {
|
||||
let record = rowData;
|
||||
return <Link to={"/project/" + record.project_id + "/interface/case/" + record._id}>{record.casename.length > 23 ?record.casename.substr(0, 20) + '...' : record.casename}</Link>
|
||||
return <Link to={"/project/" + record.project_id + "/interface/case/" + record._id}>{record.casename.length > 23 ? record.casename.substr(0, 20) + '...' : record.casename}</Link>
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -618,7 +630,7 @@ class InterfaceColContent extends Component {
|
||||
<Switch checked={this.state.enableScript} onChange={e => this.setState({ enableScript: e })} />
|
||||
</h3>
|
||||
<AceEditor className="case-script" data={this.state.curScript} onChange={this.handleScriptChange} />
|
||||
|
||||
|
||||
</Modal>
|
||||
</div>
|
||||
)
|
||||
|
@ -136,6 +136,9 @@ export default class InterfaceColMenu extends Component {
|
||||
this.props.history.push('/project/' + project_id + '/interface/case/' + id)
|
||||
}
|
||||
}
|
||||
this.setState({
|
||||
expands: null
|
||||
})
|
||||
}
|
||||
|
||||
showDelColConfirm = (colId) => {
|
||||
@ -221,7 +224,7 @@ export default class InterfaceColMenu extends Component {
|
||||
that.props.history.push('/project/' + params.id + '/interface/col/')
|
||||
} else {
|
||||
that.props.fetchInterfaceColList(that.props.match.params.id);
|
||||
that.props.setColData({isRander: true })
|
||||
that.props.setColData({ isRander: true })
|
||||
}
|
||||
} else {
|
||||
message.error(res.data.errmsg);
|
||||
@ -264,7 +267,7 @@ export default class InterfaceColMenu extends Component {
|
||||
this.setState({ importInterVisible: false })
|
||||
message.success('导入集合成功');
|
||||
await this.props.fetchInterfaceColList(project_id);
|
||||
this.props.setColData({ isRander: true })
|
||||
this.props.setColData({ isRander: true })
|
||||
} else {
|
||||
message.error(res.data.errmsg);
|
||||
}
|
||||
@ -319,7 +322,7 @@ export default class InterfaceColMenu extends Component {
|
||||
|
||||
render() {
|
||||
// const { currColId, currCaseId, isShowCol } = this.props;
|
||||
const { colModalType, colModalVisible, filterValue, importInterVisible } = this.state;
|
||||
const { colModalType, colModalVisible, importInterVisible } = this.state;
|
||||
|
||||
// const menu = (col) => {
|
||||
// return (
|
||||
@ -351,7 +354,7 @@ export default class InterfaceColMenu extends Component {
|
||||
}
|
||||
return {
|
||||
expands: this.state.expands ? this.state.expands : ['col_' + currCase.col_id],
|
||||
selects: ['case_'+currCase._id + ""]
|
||||
selects: ['case_' + currCase._id + ""]
|
||||
}
|
||||
} else {
|
||||
let col_id = router.params.actionId;
|
||||
@ -368,37 +371,34 @@ export default class InterfaceColMenu extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
const item_interface_col_create = (interfaceCase) => {
|
||||
// console.log('interfaceCase', interfaceCase);
|
||||
return (
|
||||
<TreeNode
|
||||
style={{ width: '100%' }}
|
||||
key={'case_' + interfaceCase._id}
|
||||
title={
|
||||
<div className="menu-title" title={interfaceCase.casename}>
|
||||
<span className="casename">{interfaceCase.casename}</span>
|
||||
<Tooltip title="删除用例">
|
||||
<Icon type='delete' className="case-delete-icon" onClick={(e) => { e.stopPropagation(); this.showDelCaseConfirm(interfaceCase._id) }} />
|
||||
</Tooltip>
|
||||
</div>
|
||||
}
|
||||
></TreeNode>
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
let currentKes = defaultExpandedKeys();
|
||||
// console.log('currentKey', currentKes)
|
||||
|
||||
let isFilterCat = false;
|
||||
// console.log();
|
||||
// let caseList = this.props.interfaceColList.caseList;
|
||||
// if(caseList&&caseList.length>1){
|
||||
// caseList = caseList.sort((a,b)=>{
|
||||
// return a.index-b.index;
|
||||
// });
|
||||
// this.props.interfaceColList.caseList = caseList;
|
||||
// }
|
||||
const list = this.props.interfaceColList.filter(col => {
|
||||
if (col.name.indexOf(filterValue) !== -1) {
|
||||
isFilterCat = true;
|
||||
return true;
|
||||
}
|
||||
isFilterCat = false;
|
||||
|
||||
let caseList = col.caseList.filter(item => {
|
||||
return item.casename.indexOf(filterValue) !== -1
|
||||
})
|
||||
|
||||
return caseList.length > 0;
|
||||
});
|
||||
|
||||
let menuList = this.props.interfaceColList;
|
||||
|
||||
let list = this.props.interfaceColList;
|
||||
|
||||
if (this.state.filterValue) {
|
||||
let arr = [];
|
||||
menuList = menuList.filter((item) => {
|
||||
list = list.filter((item) => {
|
||||
let interfaceFilter = false;
|
||||
if (item.name.indexOf(this.state.filterValue) === -1) {
|
||||
item.caseList = item.caseList.filter(inter => {
|
||||
@ -421,8 +421,8 @@ export default class InterfaceColMenu extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
console.log('list',menuList);
|
||||
console.log('currentKey', currentKes)
|
||||
// console.log('list', list);
|
||||
// console.log('currentKey', currentKes)
|
||||
|
||||
return (
|
||||
<div>
|
||||
@ -434,6 +434,8 @@ export default class InterfaceColMenu extends Component {
|
||||
</div>
|
||||
<Tree
|
||||
className="col-list-tree"
|
||||
defaultExpandedKeys={currentKes.expands}
|
||||
defaultSelectedKeys={currentKes.selects}
|
||||
expandedKeys={currentKes.expands}
|
||||
selectedKeys={currentKes.selects}
|
||||
onSelect={this.onSelect}
|
||||
@ -469,29 +471,8 @@ export default class InterfaceColMenu extends Component {
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{
|
||||
col.caseList && col.caseList.filter((item) => {
|
||||
if (isFilterCat) {
|
||||
return true;
|
||||
}
|
||||
return item.casename.indexOf(filterValue) !== -1
|
||||
}).sort((a, b) => {
|
||||
return a.index - b.index;
|
||||
}).map((interfaceCase) => (
|
||||
<TreeNode
|
||||
style={{ width: '100%' }}
|
||||
key={'case_' + interfaceCase._id}
|
||||
title={
|
||||
<div className="menu-title" title={interfaceCase.casename}>
|
||||
<span className="casename">{interfaceCase.casename}</span>
|
||||
<Tooltip title="删除用例">
|
||||
<Icon type='delete' className="case-delete-icon" onClick={(e) => { e.stopPropagation(); this.showDelCaseConfirm(interfaceCase._id) }} />
|
||||
</Tooltip>
|
||||
</div>
|
||||
}
|
||||
></TreeNode>
|
||||
))
|
||||
}
|
||||
{col.caseList.map(item_interface_col_create)}
|
||||
|
||||
</TreeNode>
|
||||
))
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ export default (state = initialState, action) => {
|
||||
}
|
||||
}
|
||||
case FETCH_CASE_LIST: {
|
||||
console.log('list',action.payload.data.data)
|
||||
return {
|
||||
...state,
|
||||
currCaseList: action.payload.data.data
|
||||
|
@ -1,7 +1,7 @@
|
||||
## 介绍
|
||||
<p style='text-indent:2em;line-height:1.8em'>Web 应用通常是前后端分离开发的,后端提供调用的接口,前端使用接口返回 json 数据渲染到 UI,接口测试就是保证后端接口的数据正确性。
|
||||
|
||||
对于很多团队,接口测试就是手动运行接口,肉眼比对接口返回的数据,这样的操作流程效率低下,容易出错。使用 YApi 只需要在可视化 GUI 下,配置下每个接口的入参和对 RESPONSE 断言,即可实现对接口的自动化测试,大大提升了接口测试的效率。</p>
|
||||
对于很多团队,接口测试就是手动运行接口,肉眼比对接口返回的数据,这样的操作流程效率低下,容易出错。使用 YApi 只需要在可视化 GUI 下,配置下每个接口的入参和对 RESPONSE 断言,即可实现对接口的自动化测试,大大提升了接口测试的效率。<a target="_blank" href="https://blog.ymfe.org/api-autotest/#more">自动化测试实践</a></p>
|
||||
|
||||
## 测试列表
|
||||
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -147,15 +142,15 @@
|
||||
<ul class="nav docs-sidenav-extend" >
|
||||
|
||||
<li >
|
||||
<a href="#Mock_期望">Mock 期望</a>
|
||||
<a href="#Mock 期望">Mock 期望</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#自定义_Mock_脚本">自定义 Mock 脚本</a>
|
||||
<a href="#自定义 Mock 脚本">自定义 Mock 脚本</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#Mock_优先级说明">Mock 优先级说明</a>
|
||||
<a href="#Mock 优先级说明">Mock 优先级说明</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -3346,7 +3341,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/interface.js.html#76" target="_blank">./server/controllers/interface.js:76</a>
|
||||
<a href="./static/server/controllers/interface.js.html#82" target="_blank">./server/controllers/interface.js:82</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -3667,7 +3662,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/interface.js.html#176" target="_blank">./server/controllers/interface.js:176</a>
|
||||
<a href="./static/server/controllers/interface.js.html#182" target="_blank">./server/controllers/interface.js:182</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -3732,7 +3727,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/interface.js.html#219" target="_blank">./server/controllers/interface.js:219</a>
|
||||
<a href="./static/server/controllers/interface.js.html#225" target="_blank">./server/controllers/interface.js:225</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -3797,7 +3792,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/interface.js.html#317" target="_blank">./server/controllers/interface.js:317</a>
|
||||
<a href="./static/server/controllers/interface.js.html#323" target="_blank">./server/controllers/interface.js:323</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -4030,7 +4025,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/interface.js.html#447" target="_blank">./server/controllers/interface.js:447</a>
|
||||
<a href="./static/server/controllers/interface.js.html#454" target="_blank">./server/controllers/interface.js:454</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -4102,7 +4097,7 @@
|
||||
|
||||
<p>
|
||||
<small class="text-muted">源码位置:</small>
|
||||
<a href="./static/server/controllers/interface.js.html#645" target="_blank">./server/controllers/interface.js:645</a>
|
||||
<a href="./static/server/controllers/interface.js.html#652" target="_blank">./server/controllers/interface.js:652</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -184,7 +179,7 @@
|
||||
|
||||
<h2 class="subject" id="介绍">介绍 <a class="hashlink" href="#介绍">#</a></h2><p style='text-indent:2em;line-height:1.8em'>Web 应用通常是前后端分离开发的,后端提供调用的接口,前端使用接口返回 json 数据渲染到 UI,接口测试就是保证后端接口的数据正确性。
|
||||
|
||||
对于很多团队,接口测试就是手动运行接口,肉眼比对接口返回的数据,这样的操作流程效率低下,容易出错。使用 YApi 只需要在可视化 GUI 下,配置下每个接口的入参和对 RESPONSE 断言,即可实现对接口的自动化测试,大大提升了接口测试的效率。</p>
|
||||
对于很多团队,接口测试就是手动运行接口,肉眼比对接口返回的数据,这样的操作流程效率低下,容易出错。使用 YApi 只需要在可视化 GUI 下,配置下每个接口的入参和对 RESPONSE 断言,即可实现对接口的自动化测试,大大提升了接口测试的效率。<a target="_blank" href="https://blog.ymfe.org/api-autotest/#more">自动化测试实践</a></p>
|
||||
|
||||
<h2 class="subject" id="测试列表">测试列表 <a class="hashlink" href="#测试列表">#</a></h2><p><img class="doc-img" style="width: 618px;" src="./images/usage/case-list.gif" /></p>
|
||||
<p>在测试列表可以看到每个测试用例的 key,还有 开始测试、报告等功能</p>
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -163,15 +158,15 @@
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#Postman_数据导入">Postman 数据导入</a>
|
||||
<a href="#Postman 数据导入">Postman 数据导入</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#HAR_数据导入">HAR 数据导入</a>
|
||||
<a href="#HAR 数据导入">HAR 数据导入</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#Swagger_数据导入">Swagger 数据导入</a>
|
||||
<a href="#Swagger 数据导入">Swagger 数据导入</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -117,11 +112,11 @@
|
||||
<ul class="nav docs-sidenav-extend" >
|
||||
|
||||
<li >
|
||||
<a href="#方式一._可视化部署[推荐]">方式一. 可视化部署[推荐]</a>
|
||||
<a href="#方式一. 可视化部署[推荐]">方式一. 可视化部署[推荐]</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#方式二._命令行部署">方式二. 命令行部署</a>
|
||||
<a href="#方式二. 命令行部署">方式二. 命令行部署</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@ -141,7 +136,7 @@
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="#配置邮箱__仅支持_SMTP_">配置邮箱 (仅支持 SMTP)</a>
|
||||
<a href="#配置邮箱 (仅支持 SMTP)">配置邮箱 (仅支持 SMTP)</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -145,19 +140,19 @@
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#定义_mock_数据示例">定义 mock 数据示例</a>
|
||||
<a href="#定义 mock 数据示例">定义 mock 数据示例</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#YApi-Mock_跟_Mockjs_区别">YApi-Mock 跟 Mockjs 区别</a>
|
||||
<a href="#YApi-Mock 跟 Mockjs 区别">YApi-Mock 跟 Mockjs 区别</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#如何使用_Mock">如何使用 Mock</a>
|
||||
<a href="#如何使用 Mock">如何使用 Mock</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#Mock_语法规范">Mock 语法规范</a>
|
||||
<a href="#Mock 语法规范">Mock 语法规范</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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 接口管理平台 插件 Wiki</title>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -123,7 +118,7 @@
|
||||
<ul class="nav docs-sidenav-extend" >
|
||||
|
||||
<li >
|
||||
<a href="#运行开发服务器_参考二次开发_">运行开发服务器(参考二次开发)</a>
|
||||
<a href="#运行开发服务器(参考二次开发)">运行开发服务器(参考二次开发)</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
@ -135,7 +130,7 @@
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#index.js_配置说明">index.js 配置说明</a>
|
||||
<a href="#index.js 配置说明">index.js 配置说明</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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 接口管理平台 插件 Wiki</title>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -129,11 +124,11 @@
|
||||
<ul class="nav docs-sidenav-extend" >
|
||||
|
||||
<li >
|
||||
<a href="#后端_hookList">后端 hookList</a>
|
||||
<a href="#后端 hookList">后端 hookList</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#前端_hookList">前端 hookList</a>
|
||||
<a href="#前端 hookList">前端 hookList</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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 接口管理平台 插件 Wiki</title>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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 接口管理平台 插件 Wiki</title>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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 接口管理平台 插件 Wiki</title>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -105,31 +100,31 @@
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="#Q1_怎样联系组长?">Q1 怎样联系组长?</a>
|
||||
<a href="#Q1 怎样联系组长?">Q1 怎样联系组长?</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="#Q2_怎么快速迁移旧项目?">Q2 怎么快速迁移旧项目?</a>
|
||||
<a href="#Q2 怎么快速迁移旧项目?">Q2 怎么快速迁移旧项目?</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="#Q3_忘记密码怎么办?">Q3 忘记密码怎么办?</a>
|
||||
<a href="#Q3 忘记密码怎么办?">Q3 忘记密码怎么办?</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="#Q4_发现了_Bug_怎么办?">Q4 发现了 Bug 怎么办?</a>
|
||||
<a href="#Q4 发现了 Bug 怎么办?">Q4 发现了 Bug 怎么办?</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="#Q5_可视化部署一直处于_github_压缩包下载状态怎么办?">Q5 可视化部署一直处于 github 压缩包下载状态怎么办?</a>
|
||||
<a href="#Q5 可视化部署一直处于 github 压缩包下载状态怎么办?">Q5 可视化部署一直处于 github 压缩包下载状态怎么办?</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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 接口管理平台 插件 Wiki</title>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -123,7 +118,7 @@
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#启动_prd_环境服务器">启动 prd 环境服务器</a>
|
||||
<a href="#启动 prd 环境服务器">启动 prd 环境服务器</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -102,6 +97,10 @@
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
<li >
|
||||
<a href="#v1.3.1">v1.3.1</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#v1.3.0">v1.3.0</a>
|
||||
</li>
|
||||
@ -162,7 +161,9 @@
|
||||
|
||||
<div class="content-right markdown-body use-sidebar" role="main">
|
||||
|
||||
<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>
|
||||
<h3 class="subject" id="v1.3.1">v1.3.1 <a class="hashlink" href="#v1.3.1">#</a></h3><h4 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h4><ol>
|
||||
<li>修复接口状态和req_params参数无法更新问题</li></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>接口运行支持加工运行前后的 request 和 response ,主要是处理加密的接口或各种 token 参数问题</li><li>自动化测试除提供自定义脚本外,还提供可视化表单形式验证一些数据,例如 statusCode、bodyContent </li><li>增加查看接口详细改动</li><li>支持接口运行页面 body 全屏编辑</li><li>数据导出到 html 支持了分类</li></ul>
|
||||
<h4 class="subject" id="Bug_Fixed">Bug Fixed <a class="hashlink" href="#Bug_Fixed">#</a></h4><ul>
|
||||
<li>修复了高级 Mock 无法获取到真实客户端 ip </li></ul>
|
||||
|
@ -53,6 +53,7 @@ class interfaceController extends baseController {
|
||||
|
||||
const addAndUpCommonField = {
|
||||
'desc': 'string',
|
||||
'status': 'string',
|
||||
req_query: [{
|
||||
name: 'string',
|
||||
value: 'string',
|
||||
@ -68,6 +69,11 @@ class interfaceController extends baseController {
|
||||
required: 'string'
|
||||
}],
|
||||
req_body_type: 'string',
|
||||
req_params:[{
|
||||
name: 'string',
|
||||
example: 'string',
|
||||
desc: 'string'
|
||||
}],
|
||||
req_body_form: [{
|
||||
name: 'string',
|
||||
type: {
|
||||
@ -371,6 +377,7 @@ class interfaceController extends baseController {
|
||||
|
||||
async up(ctx) {
|
||||
let params = ctx.params;
|
||||
// console.log('params', params.req_params);
|
||||
|
||||
if (!_.isUndefined(params.method)) {
|
||||
params.method = params.method || 'GET';
|
||||
|
@ -2,15 +2,14 @@
|
||||
<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>
|
||||
|
||||
<meta name="keywords" content="api管理,接口管理,接口文档,api文档">
|
||||
|
||||
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="./images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
@ -18,10 +17,6 @@
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
|
Loading…
x
Reference in New Issue
Block a user