json-schema-library
Advanced tools
Comparing version 2.3.0 to 2.3.1
/* eslint quote-props: 0 */ | ||
const resolveOneOfFuzzy = require("./resolveOneOf.fuzzy"); | ||
const getTypeOf = require("./getTypeOf"); | ||
@@ -34,2 +35,9 @@ | ||
} | ||
if (data != null && getTypeOf(data) !== schema.type) { | ||
// reset invalid type | ||
console.error("Schema does not match data", data, "schema:", schema); | ||
data = null; | ||
} | ||
// eslint-disable-next-line no-use-before-define | ||
@@ -36,0 +44,0 @@ if (TYPE[schema.type] == null) { |
{ | ||
"name": "json-schema-library", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Customizable and hackable json-validator and json-schema utilities for traversal, data generation and validation", | ||
@@ -37,2 +37,2 @@ "main": "index.js", | ||
} | ||
} | ||
} |
268206
5409