From 4907f76542edd258bd27b5b65bd5ada59106a857 Mon Sep 17 00:00:00 2001 From: Corey Sewell Date: Fri, 17 Sep 2021 10:39:36 +1200 Subject: [PATCH] Ignore schema type if schame contains all of Fixes #290 --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 34d44cda..c0806280 100644 --- a/index.js +++ b/index.js @@ -185,6 +185,9 @@ const numberKeywords = [ * https://json-schema.org/latest/json-schema-validation.html#rfc.section.6 */ function inferTypeByKeyword (schema) { + if (schema.$allOff !== undefined){ + return undefined; + } // eslint-disable-next-line for (var keyword of objectKeywords) { if (keyword in schema) return 'object'