From 720817f914806b20f6a4a79aebacc3d3b4332b6b Mon Sep 17 00:00:00 2001 From: pospi Date: Tue, 22 Nov 2016 12:13:42 +1000 Subject: [PATCH] remove REDECLARES_PROPERTY error to allow allOf to be used in conjunction with additionalProperties: false --- lib/specs.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/specs.js b/lib/specs.js index c5db3a422b..71f5c6f52d 100644 --- a/lib/specs.js +++ b/lib/specs.js @@ -552,15 +552,7 @@ var processDocument = function (documentMetadata, results) { // Do not process unresolved properties if (!_.isUndefined(property)) { validateSchemaConstraints(documentMetadata, property, pPath, results); - - if (iProperties.indexOf(name) > -1) { - createErrorOrWarning('CHILD_' + code + '_REDECLARES_PROPERTY', - 'Child ' + code.toLowerCase() + ' declares property already declared by ancestor: ' + - name, - pPath, results.errors); - } else { - dProperties.push(name); - } + dProperties.push(name); } });