function anonymous(self,RULES,formats,root,refVal,defaults,customRules,equal,ucs2length,ValidationError ) { var refVal0 = refVal[0];var refVal1 = refVal[1];var refVal2 = refVal[2];var refVal3 = refVal[3];var refVal4 = refVal[4];var refVal5 = refVal[5]; var validate = function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; var vErrors = null; var errors = 0; if (rootData === undefined) rootData = data; if ((!data || typeof data !== "object" || Array.isArray(data)) && typeof data !== "boolean") { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + "" , schemaPath: '#/type' , params: { type: 'object,boolean' } , message: 'should be object,boolean' } ]; return false; } if ((data && typeof data === "object" && !Array.isArray(data))) { var errs__0 = errors;var valid1 = true; var data1 = data.$id; if ( data1 === undefined ) { valid1 = true; } else { var errs_1 = errors; if ((typeof data1 === "number")) { if (true) { } } if (errors === errs_1) { if (typeof data1 === "string") { if (! formats['uri-reference'].test(data1) ) { validate.errors = [ { keyword: 'format' , dataPath: (dataPath || '') + '.$id' , schemaPath: '#/properties/%24id/format' , params: { format: 'uri-reference' } , message: 'should match format "uri-reference"' } ]; return false; } else { } } else { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.$id' , schemaPath: '#/properties/%24id/type' , params: { type: 'string' } , message: 'should be string' } ]; return false; } if (errors === errs_1) { }} var valid1 = errors === errs_1; } if (valid1) { var data1 = data.$schema; if ( data1 === undefined ) { valid1 = true; } else { var errs_1 = errors; if ((typeof data1 === "number")) { if (true) { } } if (errors === errs_1) { if (typeof data1 === "string") { if (! formats.uri.test(data1) ) { validate.errors = [ { keyword: 'format' , dataPath: (dataPath || '') + '.$schema' , schemaPath: '#/properties/%24schema/format' , params: { format: 'uri' } , message: 'should match format "uri"' } ]; return false; } else { } } else { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.$schema' , schemaPath: '#/properties/%24schema/type' , params: { type: 'string' } , message: 'should be string' } ]; return false; } if (errors === errs_1) { }} var valid1 = errors === errs_1; } if (valid1) { var data1 = data.$ref; if ( data1 === undefined ) { valid1 = true; } else { var errs_1 = errors; if ((typeof data1 === "number")) { if (true) { } } if (errors === errs_1) { if (typeof data1 === "string") { if (! formats['uri-reference'].test(data1) ) { validate.errors = [ { keyword: 'format' , dataPath: (dataPath || '') + '.$ref' , schemaPath: '#/properties/%24ref/format' , params: { format: 'uri-reference' } , message: 'should match format "uri-reference"' } ]; return false; } else { } } else { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.$ref' , schemaPath: '#/properties/%24ref/type' , params: { type: 'string' } , message: 'should be string' } ]; return false; } if (errors === errs_1) { }} var valid1 = errors === errs_1; } if (valid1) { if ( data.$comment === undefined ) { valid1 = true; } else { var errs_1 = errors; if (typeof data.$comment !== "string") { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.$comment' , schemaPath: '#/properties/%24comment/type' , params: { type: 'string' } , message: 'should be string' } ]; return false; } var valid1 = errors === errs_1; } if (valid1) { if ( data.title === undefined ) { valid1 = true; } else { var errs_1 = errors; if (typeof data.title !== "string") { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.title' , schemaPath: '#/properties/title/type' , params: { type: 'string' } , message: 'should be string' } ]; return false; } var valid1 = errors === errs_1; } if (valid1) { if ( data.description === undefined ) { valid1 = true; } else { var errs_1 = errors; if (typeof data.description !== "string") { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.description' , schemaPath: '#/properties/description/type' , params: { type: 'string' } , message: 'should be string' } ]; return false; } var valid1 = errors === errs_1; } if (valid1) { if (valid1) { if ( data.readOnly === undefined ) { valid1 = true; } else { var errs_1 = errors; if (typeof data.readOnly !== "boolean") { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.readOnly' , schemaPath: '#/properties/readOnly/type' , params: { type: 'boolean' } , message: 'should be boolean' } ]; return false; } var valid1 = errors === errs_1; } if (valid1) { if ( data.examples === undefined ) { valid1 = true; } else { var errs_1 = errors; if (Array.isArray(data.examples)) { var errs__1 = errors;var valid1; if (errs__1 == errors) { } } else { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.examples' , schemaPath: '#/properties/examples/type' , params: { type: 'array' } , message: 'should be array' } ]; return false; } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { var data1 = data.multipleOf; if ( data1 === undefined ) { valid1 = true; } else { var errs_1 = errors; if ((typeof data1 === "number")) { if ( data1 <= 0 || data1 !== data1) { validate.errors = [ { keyword: 'exclusiveMinimum' , dataPath: (dataPath || '') + '.multipleOf' , schemaPath: '#/properties/multipleOf/exclusiveMinimum' , params: { comparison: '>', limit: 0, exclusive: true } , message: 'should be > 0' } ]; return false; } else { } } else { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.multipleOf' , schemaPath: '#/properties/multipleOf/type' , params: { type: 'number' } , message: 'should be number' } ]; return false; } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { if ( data.maximum === undefined ) { valid1 = true; } else { var errs_1 = errors; if ((typeof data.maximum !== "number")) { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.maximum' , schemaPath: '#/properties/maximum/type' , params: { type: 'number' } , message: 'should be number' } ]; return false; } var valid1 = errors === errs_1; } if (valid1) { if ( data.exclusiveMaximum === undefined ) { valid1 = true; } else { var errs_1 = errors; if ((typeof data.exclusiveMaximum !== "number")) { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.exclusiveMaximum' , schemaPath: '#/properties/exclusiveMaximum/type' , params: { type: 'number' } , message: 'should be number' } ]; return false; } var valid1 = errors === errs_1; } if (valid1) { if ( data.minimum === undefined ) { valid1 = true; } else { var errs_1 = errors; if ((typeof data.minimum !== "number")) { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.minimum' , schemaPath: '#/properties/minimum/type' , params: { type: 'number' } , message: 'should be number' } ]; return false; } var valid1 = errors === errs_1; } if (valid1) { if ( data.exclusiveMinimum === undefined ) { valid1 = true; } else { var errs_1 = errors; if ((typeof data.exclusiveMinimum !== "number")) { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.exclusiveMinimum' , schemaPath: '#/properties/exclusiveMinimum/type' , params: { type: 'number' } , message: 'should be number' } ]; return false; } var valid1 = errors === errs_1; } if (valid1) { var data1 = data.maxLength; if ( data1 === undefined ) { valid1 = true; } else { var errs_1 = errors; var errs_2 = errors; if ((typeof data1 !== "number" || (data1 % 1) || data1 !== data1)) { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.maxLength' , schemaPath: '#/definitions/nonNegativeInteger/type' , params: { type: 'integer' } , message: 'should be integer' } ]; return false; } if ((typeof data1 === "number")) { if ( data1 < 0 || data1 !== data1) { validate.errors = [ { keyword: 'minimum' , dataPath: (dataPath || '') + '.maxLength' , schemaPath: '#/definitions/nonNegativeInteger/minimum' , params: { comparison: '>=', limit: 0, exclusive: false } , message: 'should be >= 0' } ]; return false; } else { } } if (errors === errs_2) { } var valid2 = errors === errs_2; if (valid2) { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { if ( data.minLength === undefined ) { valid1 = true; } else { var errs_1 = errors; if (! refVal2( data.minLength, (dataPath || '') + '.minLength' , data , 'minLength', rootData) ) { if (vErrors === null) vErrors = refVal2.errors; else vErrors = vErrors.concat(refVal2.errors); errors = vErrors.length; } else { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { var data1 = data.pattern; if ( data1 === undefined ) { valid1 = true; } else { var errs_1 = errors; if ((typeof data1 === "number")) { if (true) { } } if (errors === errs_1) { if (typeof data1 === "string") { if (! formats.regex(data1) ) { validate.errors = [ { keyword: 'format' , dataPath: (dataPath || '') + '.pattern' , schemaPath: '#/properties/pattern/format' , params: { format: 'regex' } , message: 'should match format "regex"' } ]; return false; } else { } } else { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.pattern' , schemaPath: '#/properties/pattern/type' , params: { type: 'string' } , message: 'should be string' } ]; return false; } if (errors === errs_1) { }} var valid1 = errors === errs_1; } if (valid1) { if ( data.additionalItems === undefined ) { valid1 = true; } else { var errs_1 = errors; if (! validate( data.additionalItems, (dataPath || '') + '.additionalItems' , data , 'additionalItems', rootData) ) { if (vErrors === null) vErrors = validate.errors; else vErrors = vErrors.concat(validate.errors); errors = vErrors.length; } else { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { var data1 = data.items; if ( data1 === undefined ) { valid1 = true; } else { var errs_1 = errors; var errs__1 = errors; var valid1 = false; var errs_2 = errors; if (! validate( data1, (dataPath || '') + '.items' , data , 'items', rootData) ) { if (vErrors === null) vErrors = validate.errors; else vErrors = vErrors.concat(validate.errors); errors = vErrors.length; } else { } if (errors === errs_2) { } var valid2 = errors === errs_2; valid1 = valid1 || valid2; if (!valid1) { var errs_2 = errors; if (! refVal3( data1, (dataPath || '') + '.items' , data , 'items', rootData) ) { if (vErrors === null) vErrors = refVal3.errors; else vErrors = vErrors.concat(refVal3.errors); errors = vErrors.length; } else { } if (errors === errs_2) { } var valid2 = errors === errs_2; valid1 = valid1 || valid2; if (!valid1) { }} if (!valid1) { var err = { keyword: 'anyOf' , dataPath: (dataPath || '') + '.items' , schemaPath: '#/properties/items/anyOf' , params: {} , message: 'should match some schema in anyOf' } ; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; validate.errors = vErrors; return false; } else { errors = errs__1; if (vErrors !== null) { if (errs__1) vErrors.length = errs__1; else vErrors = null; } } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { var data1 = data.maxItems; if ( data1 === undefined ) { valid1 = true; } else { var errs_1 = errors; var errs_2 = errors; if ((typeof data1 !== "number" || (data1 % 1) || data1 !== data1)) { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.maxItems' , schemaPath: '#/definitions/nonNegativeInteger/type' , params: { type: 'integer' } , message: 'should be integer' } ]; return false; } if ((typeof data1 === "number")) { if ( data1 < 0 || data1 !== data1) { validate.errors = [ { keyword: 'minimum' , dataPath: (dataPath || '') + '.maxItems' , schemaPath: '#/definitions/nonNegativeInteger/minimum' , params: { comparison: '>=', limit: 0, exclusive: false } , message: 'should be >= 0' } ]; return false; } else { } } if (errors === errs_2) { } var valid2 = errors === errs_2; if (valid2) { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { if ( data.minItems === undefined ) { valid1 = true; } else { var errs_1 = errors; if (! refVal[2]( data.minItems, (dataPath || '') + '.minItems' , data , 'minItems', rootData) ) { if (vErrors === null) vErrors = refVal[2].errors; else vErrors = vErrors.concat(refVal[2].errors); errors = vErrors.length; } else { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { if ( data.uniqueItems === undefined ) { valid1 = true; } else { var errs_1 = errors; if (typeof data.uniqueItems !== "boolean") { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.uniqueItems' , schemaPath: '#/properties/uniqueItems/type' , params: { type: 'boolean' } , message: 'should be boolean' } ]; return false; } var valid1 = errors === errs_1; } if (valid1) { if ( data.contains === undefined ) { valid1 = true; } else { var errs_1 = errors; if (! validate( data.contains, (dataPath || '') + '.contains' , data , 'contains', rootData) ) { if (vErrors === null) vErrors = validate.errors; else vErrors = vErrors.concat(validate.errors); errors = vErrors.length; } else { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { var data1 = data.maxProperties; if ( data1 === undefined ) { valid1 = true; } else { var errs_1 = errors; var errs_2 = errors; if ((typeof data1 !== "number" || (data1 % 1) || data1 !== data1)) { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.maxProperties' , schemaPath: '#/definitions/nonNegativeInteger/type' , params: { type: 'integer' } , message: 'should be integer' } ]; return false; } if ((typeof data1 === "number")) { if ( data1 < 0 || data1 !== data1) { validate.errors = [ { keyword: 'minimum' , dataPath: (dataPath || '') + '.maxProperties' , schemaPath: '#/definitions/nonNegativeInteger/minimum' , params: { comparison: '>=', limit: 0, exclusive: false } , message: 'should be >= 0' } ]; return false; } else { } } if (errors === errs_2) { } var valid2 = errors === errs_2; if (valid2) { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { if ( data.minProperties === undefined ) { valid1 = true; } else { var errs_1 = errors; if (! refVal[2]( data.minProperties, (dataPath || '') + '.minProperties' , data , 'minProperties', rootData) ) { if (vErrors === null) vErrors = refVal[2].errors; else vErrors = vErrors.concat(refVal[2].errors); errors = vErrors.length; } else { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { var data1 = data.required; if ( data1 === undefined ) { valid1 = true; } else { var errs_1 = errors; var errs_2 = errors; if (Array.isArray(data1)) { var errs__2 = errors;var valid2; for (var i2 = 0; i2 < data1.length; i2++) { var errs_3 = errors; if (typeof data1[i2] !== "string") { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.required[' + i2 + ']' , schemaPath: '#/definitions/stringArray/items/type' , params: { type: 'string' } , message: 'should be string' } ]; return false; } var valid3 = errors === errs_3; if (!valid3) break; } if (errs__2 == errors) { var i = data1.length , valid2 = true , j; if (i > 1) { var itemIndices = {}, item; for (;i--;) { var item = data1[i]; if (typeof item !== "string") continue; if (typeof itemIndices[item] == 'number') { valid2 = false; j = itemIndices[item]; break; } itemIndices[item] = i; } } if (!valid2) { validate.errors = [ { keyword: 'uniqueItems' , dataPath: (dataPath || '') + '.required' , schemaPath: '#/definitions/stringArray/uniqueItems' , params: { i: i, j: j } , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' } ]; return false; } else { }} } else { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.required' , schemaPath: '#/definitions/stringArray/type' , params: { type: 'array' } , message: 'should be array' } ]; return false; } if (errors === errs_2) { } var valid2 = errors === errs_2; if (valid2) { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { if ( data.additionalProperties === undefined ) { valid1 = true; } else { var errs_1 = errors; if (! validate( data.additionalProperties, (dataPath || '') + '.additionalProperties' , data , 'additionalProperties', rootData) ) { if (vErrors === null) vErrors = validate.errors; else vErrors = vErrors.concat(validate.errors); errors = vErrors.length; } else { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { var data1 = data.definitions; if ( data1 === undefined ) { valid1 = true; } else { var errs_1 = errors; if ((data1 && typeof data1 === "object" && !Array.isArray(data1))) { var errs__1 = errors;var valid2 = true; for (var key1 in data1) { var errs_2 = errors; if (! validate( data1[key1], (dataPath || '') + '.definitions[\'' + key1 + '\']' , data1 , key1, rootData) ) { if (vErrors === null) vErrors = validate.errors; else vErrors = vErrors.concat(validate.errors); errors = vErrors.length; } else { } if (errors === errs_2) { } var valid2 = errors === errs_2; if (!valid2) break; } if (valid2) { } if (errs__1 == errors) { } } else { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.definitions' , schemaPath: '#/properties/definitions/type' , params: { type: 'object' } , message: 'should be object' } ]; return false; } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { var data1 = data.properties; if ( data1 === undefined ) { valid1 = true; } else { var errs_1 = errors; if ((data1 && typeof data1 === "object" && !Array.isArray(data1))) { var errs__1 = errors;var valid2 = true; for (var key1 in data1) { var errs_2 = errors; if (! validate( data1[key1], (dataPath || '') + '.properties[\'' + key1 + '\']' , data1 , key1, rootData) ) { if (vErrors === null) vErrors = validate.errors; else vErrors = vErrors.concat(validate.errors); errors = vErrors.length; } else { } if (errors === errs_2) { } var valid2 = errors === errs_2; if (!valid2) break; } if (valid2) { } if (errs__1 == errors) { } } else { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.properties' , schemaPath: '#/properties/properties/type' , params: { type: 'object' } , message: 'should be object' } ]; return false; } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { var data1 = data.patternProperties; if ( data1 === undefined ) { valid1 = true; } else { var errs_1 = errors; if ((data1 && typeof data1 === "object" && !Array.isArray(data1))) { var errs__1 = errors; for (var key1 in data1) { var startErrs1 = errors; var data2 = key1; var errs_2 = errors; if ((typeof data2 === "number")) { if (true) { } } if (errors === errs_2) { if (typeof data2 === "string") { if (! formats.regex(data2) ) { var err = { keyword: 'format' , dataPath: (dataPath || '') + '.patternProperties' , schemaPath: '#/properties/patternProperties/propertyNames/format' , params: { format: 'regex' } , message: 'should match format "regex"' } ; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { } } if (errors === errs_2) { }} var valid2 = errors === errs_2; if (!valid2) { for (var i1=startErrs1; i1 1) { var itemIndices = {}, item; for (;i--;) { var item = data2[i]; if (typeof item !== "string") continue; if (typeof itemIndices[item] == 'number') { valid4 = false; j = itemIndices[item]; break; } itemIndices[item] = i; } } if (!valid4) { var err = { keyword: 'uniqueItems' , dataPath: (dataPath || '') + '.dependencies[\'' + key1 + '\']' , schemaPath: '#/definitions/stringArray/uniqueItems' , params: { i: i, j: j } , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' } ; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { }} } else { var err = { keyword: 'type' , dataPath: (dataPath || '') + '.dependencies[\'' + key1 + '\']' , schemaPath: '#/definitions/stringArray/type' , params: { type: 'array' } , message: 'should be array' } ; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } if (errors === errs_4) { } var valid4 = errors === errs_4; if (valid4) { } if (errors === errs_3) { } var valid3 = errors === errs_3; valid2 = valid2 || valid3; if (!valid2) { }} if (!valid2) { var err = { keyword: 'anyOf' , dataPath: (dataPath || '') + '.dependencies[\'' + key1 + '\']' , schemaPath: '#/properties/dependencies/additionalProperties/anyOf' , params: {} , message: 'should match some schema in anyOf' } ; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; validate.errors = vErrors; return false; } else { errors = errs__2; if (vErrors !== null) { if (errs__2) vErrors.length = errs__2; else vErrors = null; } } if (errors === errs_2) { } var valid2 = errors === errs_2; if (!valid2) break; } if (valid2) { } if (errs__1 == errors) { } } else { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.dependencies' , schemaPath: '#/properties/dependencies/type' , params: { type: 'object' } , message: 'should be object' } ]; return false; } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { if ( data.propertyNames === undefined ) { valid1 = true; } else { var errs_1 = errors; if (! validate( data.propertyNames, (dataPath || '') + '.propertyNames' , data , 'propertyNames', rootData) ) { if (vErrors === null) vErrors = validate.errors; else vErrors = vErrors.concat(validate.errors); errors = vErrors.length; } else { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { if (valid1) { var data1 = data.enum; if ( data1 === undefined ) { valid1 = true; } else { var errs_1 = errors; if (Array.isArray(data1)) { if ( data1.length < 1) { validate.errors = [ { keyword: 'minItems' , dataPath: (dataPath || '') + '.enum' , schemaPath: '#/properties/enum/minItems' , params: { limit: 1 } , message: 'should NOT have fewer than 1 items' } ]; return false; } else { var errs__1 = errors;var valid1; if (errs__1 == errors) { var i = data1.length , valid1 = true , j; if (i > 1) { outer: for (;i--;) { for (j = i; j--;) { if (equal(data1[i], data1[j])) { valid1 = false; break outer; } } } } if (!valid1) { validate.errors = [ { keyword: 'uniqueItems' , dataPath: (dataPath || '') + '.enum' , schemaPath: '#/properties/enum/uniqueItems' , params: { i: i, j: j } , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' } ]; return false; } else { }}} } else { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.enum' , schemaPath: '#/properties/enum/type' , params: { type: 'array' } , message: 'should be array' } ]; return false; } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { var data1 = data.type; if ( data1 === undefined ) { valid1 = true; } else { var errs_1 = errors; var errs__1 = errors; var valid1 = false; var errs_2 = errors; var errs_3 = errors; var schema3 = refVal5.enum;var valid3;valid3 = false;for (var i3=0; i3 1) { outer: for (;i--;) { for (j = i; j--;) { if (equal(data1[i], data1[j])) { valid2 = false; break outer; } } } } if (!valid2) { var err = { keyword: 'uniqueItems' , dataPath: (dataPath || '') + '.type' , schemaPath: '#/properties/type/anyOf/1/uniqueItems' , params: { i: i, j: j } , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' } ; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { }}} } else { var err = { keyword: 'type' , dataPath: (dataPath || '') + '.type' , schemaPath: '#/properties/type/anyOf/1/type' , params: { type: 'array' } , message: 'should be array' } ; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } if (errors === errs_2) { } var valid2 = errors === errs_2; valid1 = valid1 || valid2; if (!valid1) { }} if (!valid1) { var err = { keyword: 'anyOf' , dataPath: (dataPath || '') + '.type' , schemaPath: '#/properties/type/anyOf' , params: {} , message: 'should match some schema in anyOf' } ; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; validate.errors = vErrors; return false; } else { errors = errs__1; if (vErrors !== null) { if (errs__1) vErrors.length = errs__1; else vErrors = null; } } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { if ( data.format === undefined ) { valid1 = true; } else { var errs_1 = errors; if (typeof data.format !== "string") { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.format' , schemaPath: '#/properties/format/type' , params: { type: 'string' } , message: 'should be string' } ]; return false; } var valid1 = errors === errs_1; } if (valid1) { if ( data.contentMediaType === undefined ) { valid1 = true; } else { var errs_1 = errors; if (typeof data.contentMediaType !== "string") { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.contentMediaType' , schemaPath: '#/properties/contentMediaType/type' , params: { type: 'string' } , message: 'should be string' } ]; return false; } var valid1 = errors === errs_1; } if (valid1) { if ( data.contentEncoding === undefined ) { valid1 = true; } else { var errs_1 = errors; if (typeof data.contentEncoding !== "string") { validate.errors = [ { keyword: 'type' , dataPath: (dataPath || '') + '.contentEncoding' , schemaPath: '#/properties/contentEncoding/type' , params: { type: 'string' } , message: 'should be string' } ]; return false; } var valid1 = errors === errs_1; } if (valid1) { if ( data.if === undefined ) { valid1 = true; } else { var errs_1 = errors; if (! validate( data.if, (dataPath || '') + '.if' , data , 'if', rootData) ) { if (vErrors === null) vErrors = validate.errors; else vErrors = vErrors.concat(validate.errors); errors = vErrors.length; } else { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { if ( data.then === undefined ) { valid1 = true; } else { var errs_1 = errors; if (! validate( data.then, (dataPath || '') + '.then' , data , 'then', rootData) ) { if (vErrors === null) vErrors = validate.errors; else vErrors = vErrors.concat(validate.errors); errors = vErrors.length; } else { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { if ( data.else === undefined ) { valid1 = true; } else { var errs_1 = errors; if (! validate( data.else, (dataPath || '') + '.else' , data , 'else', rootData) ) { if (vErrors === null) vErrors = validate.errors; else vErrors = vErrors.concat(validate.errors); errors = vErrors.length; } else { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { if ( data.allOf === undefined ) { valid1 = true; } else { var errs_1 = errors; if (! refVal[3]( data.allOf, (dataPath || '') + '.allOf' , data , 'allOf', rootData) ) { if (vErrors === null) vErrors = refVal[3].errors; else vErrors = vErrors.concat(refVal[3].errors); errors = vErrors.length; } else { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { if ( data.anyOf === undefined ) { valid1 = true; } else { var errs_1 = errors; if (! refVal[3]( data.anyOf, (dataPath || '') + '.anyOf' , data , 'anyOf', rootData) ) { if (vErrors === null) vErrors = refVal[3].errors; else vErrors = vErrors.concat(refVal[3].errors); errors = vErrors.length; } else { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { if ( data.oneOf === undefined ) { valid1 = true; } else { var errs_1 = errors; if (! refVal[3]( data.oneOf, (dataPath || '') + '.oneOf' , data , 'oneOf', rootData) ) { if (vErrors === null) vErrors = refVal[3].errors; else vErrors = vErrors.concat(refVal[3].errors); errors = vErrors.length; } else { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { if ( data.not === undefined ) { valid1 = true; } else { var errs_1 = errors; if (! validate( data.not, (dataPath || '') + '.not' , data , 'not', rootData) ) { if (vErrors === null) vErrors = validate.errors; else vErrors = vErrors.concat(validate.errors); errors = vErrors.length; } else { } if (errors === errs_1) { } var valid1 = errors === errs_1; } if (valid1) { }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} if (errs__0 == errors) { } } if (errors === 0) { } validate.errors = vErrors; return errors === 0; }; return validate; }