json-2-joi 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/resolver.js +1 -1
- package/package.json +1 -1
package/lib/resolver.js
CHANGED
|
@@ -544,7 +544,7 @@ class SchemaResolver {
|
|
|
544
544
|
|
|
545
545
|
if (isObject(schema.additionalProperties)) {
|
|
546
546
|
joischema = joischema.pattern(/^/, this.resolve(schema.additionalProperties, resolveOptions, baseUri));
|
|
547
|
-
} else if (typeof this.joiOptions.allowUnknown === 'undefined') {
|
|
547
|
+
} else if (typeof this.joiOptions.allowUnknown === 'undefined' || typeof schema.additionalProperties !== 'undefined') {
|
|
548
548
|
joischema = joischema.unknown(schema.additionalProperties !== false);
|
|
549
549
|
}
|
|
550
550
|
|