midwayjs/midway-component

与 RuleType.object() 不兼容

Closed this issue · 1 comments

li-qs commented

for (const prop of joiSchema.$_terms?.keys) {

当验证对象里有 RuleType.object() 规则时,/swagger-ui/json 会报错:

object null is not iterable (cannot read property Symbol(Symbol.iterator))

debug 看了下是 joiSchema.$_terms?.keys 的值为 null

  • node version: 14.20.0
  • "@midwayjs/core": "^2.3.0"
  • "@midwayjs/decorator": "^2.3.0"
  • "@midwayjs/swagger": "^1.1.0"
li-qs commented

另一个相同的issue:midwayjs/midway#1291