Unverified Commit 4d6132e4 authored by Corey.Wang's avatar Corey.Wang Committed by GitHub
Browse files

fix: schema2json传required参数时,导致faker失败

当传了required参数时,由于三目运算符属性写错,导致alwaysFakeOptionals属性设置错误
parent 37647361
......@@ -1180,7 +1180,7 @@ class interfaceController extends baseController {
let required = ctx.request.body.required;
let res = yapi.commons.schemaToJson(schema, {
alwaysFakeOptionals: _.isUndefined(required) ? true : require
alwaysFakeOptionals: _.isUndefined(required) ? true : required
});
// console.log('res',res)
return (ctx.body = res);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment