diff --git a/lib/util/traverse.js b/lib/util/traverse.js index 254cdefec5e755b3e86cc31c2030e58fe9a0171a..442d52b64c6a500caad1abaa57d21640f782c83e 100644 Binary files a/lib/util/traverse.js and b/lib/util/traverse.js differ diff --git a/spec/core/issues/allOf.json b/spec/core/issues/allOf.json new file mode 100644 index 0000000000000000000000000000000000000000..1d01ad7f55456cb06c5b3c76d08ed16807424f2d --- /dev/null +++ b/spec/core/issues/allOf.json @@ -0,0 +1,54 @@ +[ + { + "description": "sub-schema mixins", + "schemas": [ + { + "type": "object", + "definitions": { + "inner": { + "aString": { + "allOf": [ + { "type": "string" }, + { "$ref": "#/definitions/rules" } + ] + } + }, + "rules": { + "allOf": [ + { "$ref": "#/definitions/twoChars" }, + { "$ref": "#/definitions/asEmail" } + ] + }, + "twoChars": { + "minLength": 10 + }, + "asEmail": { + "faker": "internet.email" + } + }, + "properties": { + "anArray": { + "type": "array", + "items": { + "type": "object", + "properties": { + "allOf": [ + { "$ref": "#/definitions/inner" } + ] + }, + "required": ["aString"] + } + } + }, + "required": ["anArray"] + } + ], + "tests": [ + { + "description": "should combine recursively", + "schema": "schemas.0", + "valid": true + } + ] + } +]