MCPcopy
hub / github.com/YMFE/yapi / paramsToObjectWithEnable

Function paramsToObjectWithEnable

common/postmanLib.js:359–370  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

357function handleParams(interfaceData, handleValue, requestParams) {
358 let interfaceRunData = Object.assign({}, interfaceData);
359 function paramsToObjectWithEnable(arr) {
360 const obj = {};
361 safeArray(arr).forEach(item => {
362 if (item && item.name && (item.enable || item.required === '1')) {
363 obj[item.name] = handleValue(item.value, currDomain.global);
364 if (requestParams) {
365 requestParams[item.name] = obj[item.name];
366 }
367 }
368 });
369 return obj;
370 }
371
372 function paramsToObjectUnWithEnable(arr) {
373 const obj = {};

Callers 1

handleParamsFunction · 0.85

Calls 2

safeArrayFunction · 0.85
handleValueFunction · 0.70

Tested by

no test coverage detected