Unverified Commit 7e055d33 authored by sean1025's avatar sean1025 Committed by GitHub

Merge pull request #1659 from wangchao523/patch-2

fix: schema2json传required参数时,导致faker失败
parents 37647361 4d6132e4
......@@ -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