body参数支持数组,cookie参数支持
This commit is contained in:
@@ -35,12 +35,17 @@
|
||||
let getChildren = paramObj => {
|
||||
if (paramObj.children) {
|
||||
let bodyParamObj = {};
|
||||
paramObj.children.forEach(item => {
|
||||
bodyParamObj[item.name] = getChildren(item);
|
||||
});
|
||||
paramObj.children.forEach(item => bodyParamObj[item.name] = getChildren(item));
|
||||
if (paramObj.type === 'array') {
|
||||
return [bodyParamObj];
|
||||
}
|
||||
return bodyParamObj;
|
||||
}
|
||||
return paramObj.example || '';
|
||||
let example = paramObj.example || '';
|
||||
if (paramObj.type === 'array') {
|
||||
return example ? [example] : [];
|
||||
}
|
||||
return example;
|
||||
}
|
||||
if (paramList.length === 1) {
|
||||
bodyParamObj = getChildren(paramList[0]);
|
||||
|
||||
Reference in New Issue
Block a user