Skip to content

Commit

Permalink
Ignore schema type if schame contains all of
Browse files Browse the repository at this point in the history
  • Loading branch information
cjsewell authored Sep 16, 2021
1 parent 304be26 commit 4907f76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 4907f76

Please sign in to comment.