fix(xo-server/api): allow additional props on objects without prop definitions
Fixes #6395
Introduced by d7f29e736
This commit is contained in:
parent
55f921959d
commit
39d973c43f
@ -127,8 +127,8 @@ function adaptJsonSchema(schema) {
|
||||
if (additionalProperties === undefined) {
|
||||
const wildCard = properties['*']
|
||||
if (wildCard === undefined) {
|
||||
// we want additional properties to be disabled by default
|
||||
schema.additionalProperties = false
|
||||
// we want additional properties to be disabled by default unless no properties are defined
|
||||
schema.additionalProperties = keys.length === 0
|
||||
} else {
|
||||
delete properties['*']
|
||||
keys = Object.keys(properties)
|
||||
|
Loading…
Reference in New Issue
Block a user