Skip to content

Commit 4907f76

Browse files
authored
Ignore schema type if schame contains all of
Fixes fastify#290
1 parent 304be26 commit 4907f76

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

index.js

+3
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ const numberKeywords = [
185185
* https://json-schema.org/latest/json-schema-validation.html#rfc.section.6
186186
*/
187187
function inferTypeByKeyword (schema) {
188+
if (schema.$allOff !== undefined){
189+
return undefined;
190+
}
188191
// eslint-disable-next-line
189192
for (var keyword of objectKeywords) {
190193
if (keyword in schema) return 'object'

0 commit comments

Comments
 (0)