fix: required properties (#7206)
* fix: required properties schema required properties should not be treated like required: true. this lead to objects that requires properties being treated as required itself * test: try-it-out-schema-required-override-allowed Co-authored-by: Tim Lai <timothy.lai@gmail.com>
This commit is contained in:
@@ -429,7 +429,7 @@ function validateValueBySchema(value, schema, requiredByParam, bypassRequiredChe
|
||||
let minItems = schema.get("minItems")
|
||||
let pattern = schema.get("pattern")
|
||||
|
||||
const schemaRequiresValue = requiredByParam || requiredBySchema
|
||||
const schemaRequiresValue = requiredByParam || requiredBySchema === true
|
||||
const hasValue = value !== undefined && value !== null
|
||||
const isValidEmpty = !schemaRequiresValue && !hasValue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user