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.
Files changed (2) hide show
  1. package/lib/resolver.js +1 -1
  2. 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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "json-2-joi",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "license": "Apache 2.0",
5
5
  "description": "Converts json-schema to Joi schema. (Enhanced enjoi)",
6
6
  "main": "./index.js",