somod-schema
Version:
Schema to validate yaml files in somod modules
1 lines • 33.7 kB
JavaScript
"use strict";module.exports = validate14;module.exports.default = validate14;const schema16 = {"$schema":"http://json-schema.org/draft-07/schema","$id":"https://somod.json-schema.sodaru.com/parameters/index.json","title":"JSON Schema for Parameters in SOMOD","type":"object","additionalProperties":false,"properties":{"parameters":{"type":"object","additionalProperties":{"$ref":"http://json-schema.org/draft-07/schema"},"propertyNames":{"pattern":"^[a-zA-Z][a-zA-Z0-9-_.]*$","maxLength":128,"minLength":4,"errorMessage":{"pattern":"Parameter Name must contain only alphaNumerics, dot(.), hyphen(-), and underscore(_). must start with alphabet"}},"maxProperties":64}}};const func2 = require("ajv/dist/runtime/ucs2length").default;const pattern0 = new RegExp("^[a-zA-Z][a-zA-Z0-9-_.]*$", "u");const schema0 = {"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true};const schema1 = {"type":"integer","minimum":0};const schema7 = {"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]};const schema9 = {"enum":["array","boolean","integer","null","number","object","string"]};const schema2 = {"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]};function validate1(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(!(((typeof data == "number") && (!(data % 1) && !isNaN(data))) && (isFinite(data)))){const err0 = {instancePath,schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if((typeof data == "number") && (isFinite(data))){if(data < 0 || isNaN(data)){const err1 = {instancePath,schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}validate1.errors = vErrors;return errors === 0;}const schema4 = {"type":"array","minItems":1,"items":{"$ref":"#"}};const root0 = {validate: validate0};function validate3(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){if(data.length < 1){const err0 = {instancePath,schemaPath:"#/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){if(!(root0.validate(data[i0], {instancePath:instancePath+"/" + i0,parentData:data,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? root0.validate.errors : vErrors.concat(root0.validate.errors);errors = vErrors.length;}}}else {const err1 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}validate3.errors = vErrors;return errors === 0;}const func0 = require("ajv/dist/runtime/equal").default;function validate0(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="http://json-schema.org/draft-07/schema#" */;let vErrors = null;let errors = 0;if((!(data && typeof data == "object" && !Array.isArray(data))) && (typeof data !== "boolean")){const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: schema0.type},message:"must be object,boolean"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.$id !== undefined){if(!(typeof data.$id === "string")){const err1 = {instancePath:instancePath+"/$id",schemaPath:"#/properties/%24id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.$schema !== undefined){if(!(typeof data.$schema === "string")){const err2 = {instancePath:instancePath+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.$ref !== undefined){if(!(typeof data.$ref === "string")){const err3 = {instancePath:instancePath+"/$ref",schemaPath:"#/properties/%24ref/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.$comment !== undefined){if(typeof data.$comment !== "string"){const err4 = {instancePath:instancePath+"/$comment",schemaPath:"#/properties/%24comment/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.title !== undefined){if(typeof data.title !== "string"){const err5 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.description !== undefined){if(typeof data.description !== "string"){const err6 = {instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.readOnly !== undefined){if(typeof data.readOnly !== "boolean"){const err7 = {instancePath:instancePath+"/readOnly",schemaPath:"#/properties/readOnly/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.examples !== undefined){if(!(Array.isArray(data.examples))){const err8 = {instancePath:instancePath+"/examples",schemaPath:"#/properties/examples/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.multipleOf !== undefined){let data8 = data.multipleOf;if((typeof data8 == "number") && (isFinite(data8))){if(data8 <= 0 || isNaN(data8)){const err9 = {instancePath:instancePath+"/multipleOf",schemaPath:"#/properties/multipleOf/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+"/multipleOf",schemaPath:"#/properties/multipleOf/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.maximum !== undefined){let data9 = data.maximum;if(!((typeof data9 == "number") && (isFinite(data9)))){const err11 = {instancePath:instancePath+"/maximum",schemaPath:"#/properties/maximum/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.exclusiveMaximum !== undefined){let data10 = data.exclusiveMaximum;if(!((typeof data10 == "number") && (isFinite(data10)))){const err12 = {instancePath:instancePath+"/exclusiveMaximum",schemaPath:"#/properties/exclusiveMaximum/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.minimum !== undefined){let data11 = data.minimum;if(!((typeof data11 == "number") && (isFinite(data11)))){const err13 = {instancePath:instancePath+"/minimum",schemaPath:"#/properties/minimum/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.exclusiveMinimum !== undefined){let data12 = data.exclusiveMinimum;if(!((typeof data12 == "number") && (isFinite(data12)))){const err14 = {instancePath:instancePath+"/exclusiveMinimum",schemaPath:"#/properties/exclusiveMinimum/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.maxLength !== undefined){let data13 = data.maxLength;if(!(((typeof data13 == "number") && (!(data13 % 1) && !isNaN(data13))) && (isFinite(data13)))){const err15 = {instancePath:instancePath+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if((typeof data13 == "number") && (isFinite(data13))){if(data13 < 0 || isNaN(data13)){const err16 = {instancePath:instancePath+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}if(data.minLength !== undefined){if(!(validate1(data.minLength, {instancePath:instancePath+"/minLength",parentData:data,parentDataProperty:"minLength",rootData}))){vErrors = vErrors === null ? validate1.errors : vErrors.concat(validate1.errors);errors = vErrors.length;}}if(data.pattern !== undefined){if(!(typeof data.pattern === "string")){const err17 = {instancePath:instancePath+"/pattern",schemaPath:"#/properties/pattern/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.additionalItems !== undefined){if(!(validate0(data.additionalItems, {instancePath:instancePath+"/additionalItems",parentData:data,parentDataProperty:"additionalItems",rootData}))){vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors);errors = vErrors.length;}}if(data.items !== undefined){let data17 = data.items;const _errs35 = errors;let valid2 = false;const _errs36 = errors;if(!(validate0(data17, {instancePath:instancePath+"/items",parentData:data,parentDataProperty:"items",rootData}))){vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors);errors = vErrors.length;}var _valid0 = _errs36 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs37 = errors;if(!(validate3(data17, {instancePath:instancePath+"/items",parentData:data,parentDataProperty:"items",rootData}))){vErrors = vErrors === null ? validate3.errors : vErrors.concat(validate3.errors);errors = vErrors.length;}var _valid0 = _errs37 === errors;valid2 = valid2 || _valid0;}if(!valid2){const err18 = {instancePath:instancePath+"/items",schemaPath:"#/properties/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}else {errors = _errs35;if(vErrors !== null){if(_errs35){vErrors.length = _errs35;}else {vErrors = null;}}}}if(data.maxItems !== undefined){let data18 = data.maxItems;if(!(((typeof data18 == "number") && (!(data18 % 1) && !isNaN(data18))) && (isFinite(data18)))){const err19 = {instancePath:instancePath+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if((typeof data18 == "number") && (isFinite(data18))){if(data18 < 0 || isNaN(data18)){const err20 = {instancePath:instancePath+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}}if(data.minItems !== undefined){if(!(validate1(data.minItems, {instancePath:instancePath+"/minItems",parentData:data,parentDataProperty:"minItems",rootData}))){vErrors = vErrors === null ? validate1.errors : vErrors.concat(validate1.errors);errors = vErrors.length;}}if(data.uniqueItems !== undefined){if(typeof data.uniqueItems !== "boolean"){const err21 = {instancePath:instancePath+"/uniqueItems",schemaPath:"#/properties/uniqueItems/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.contains !== undefined){if(!(validate0(data.contains, {instancePath:instancePath+"/contains",parentData:data,parentDataProperty:"contains",rootData}))){vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors);errors = vErrors.length;}}if(data.maxProperties !== undefined){let data22 = data.maxProperties;if(!(((typeof data22 == "number") && (!(data22 % 1) && !isNaN(data22))) && (isFinite(data22)))){const err22 = {instancePath:instancePath+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}if((typeof data22 == "number") && (isFinite(data22))){if(data22 < 0 || isNaN(data22)){const err23 = {instancePath:instancePath+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}}if(data.minProperties !== undefined){if(!(validate1(data.minProperties, {instancePath:instancePath+"/minProperties",parentData:data,parentDataProperty:"minProperties",rootData}))){vErrors = vErrors === null ? validate1.errors : vErrors.concat(validate1.errors);errors = vErrors.length;}}if(data.required !== undefined){let data24 = data.required;if(Array.isArray(data24)){const len0 = data24.length;for(let i0=0; i0<len0; i0++){if(typeof data24[i0] !== "string"){const err24 = {instancePath:instancePath+"/required/" + i0,schemaPath:"#/definitions/stringArray/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}let i1 = data24.length;let j0;if(i1 > 1){const indices0 = {};for(;i1--;){let item0 = data24[i1];if(typeof item0 !== "string"){continue;}if(typeof indices0[item0] == "number"){j0 = indices0[item0];const err25 = {instancePath:instancePath+"/required",schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;break;}indices0[item0] = i1;}}}else {const err26 = {instancePath:instancePath+"/required",schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.additionalProperties !== undefined){if(!(validate0(data.additionalProperties, {instancePath:instancePath+"/additionalProperties",parentData:data,parentDataProperty:"additionalProperties",rootData}))){vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors);errors = vErrors.length;}}if(data.definitions !== undefined){let data27 = data.definitions;if(data27 && typeof data27 == "object" && !Array.isArray(data27)){for(const key0 in data27){if(!(validate0(data27[key0], {instancePath:instancePath+"/definitions/" + key0.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data27,parentDataProperty:key0,rootData}))){vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors);errors = vErrors.length;}}}else {const err27 = {instancePath:instancePath+"/definitions",schemaPath:"#/properties/definitions/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(data.properties !== undefined){let data29 = data.properties;if(data29 && typeof data29 == "object" && !Array.isArray(data29)){for(const key1 in data29){if(!(validate0(data29[key1], {instancePath:instancePath+"/properties/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data29,parentDataProperty:key1,rootData}))){vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors);errors = vErrors.length;}}}else {const err28 = {instancePath:instancePath+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}if(data.patternProperties !== undefined){let data31 = data.patternProperties;if(data31 && typeof data31 == "object" && !Array.isArray(data31)){for(const key2 in data31){const _errs65 = errors;var valid11 = _errs65 === errors;if(!valid11){const err29 = {instancePath:instancePath+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames",keyword:"propertyNames",params:{propertyName: key2},message:"property name must be valid"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}for(const key3 in data31){if(!(validate0(data31[key3], {instancePath:instancePath+"/patternProperties/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data31,parentDataProperty:key3,rootData}))){vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors);errors = vErrors.length;}}}else {const err30 = {instancePath:instancePath+"/patternProperties",schemaPath:"#/properties/patternProperties/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data.dependencies !== undefined){let data33 = data.dependencies;if(data33 && typeof data33 == "object" && !Array.isArray(data33)){for(const key4 in data33){let data34 = data33[key4];const _errs72 = errors;let valid14 = false;const _errs73 = errors;if(!(validate0(data34, {instancePath:instancePath+"/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data33,parentDataProperty:key4,rootData}))){vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors);errors = vErrors.length;}var _valid1 = _errs73 === errors;valid14 = valid14 || _valid1;if(!valid14){const _errs74 = errors;if(Array.isArray(data34)){const len1 = data34.length;for(let i2=0; i2<len1; i2++){if(typeof data34[i2] !== "string"){const err31 = {instancePath:instancePath+"/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1")+"/" + i2,schemaPath:"#/definitions/stringArray/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}let i3 = data34.length;let j1;if(i3 > 1){const indices1 = {};for(;i3--;){let item1 = data34[i3];if(typeof item1 !== "string"){continue;}if(typeof indices1[item1] == "number"){j1 = indices1[item1];const err32 = {instancePath:instancePath+"/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i: i3, j: j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;break;}indices1[item1] = i3;}}}else {const err33 = {instancePath:instancePath+"/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}var _valid1 = _errs74 === errors;valid14 = valid14 || _valid1;}if(!valid14){const err34 = {instancePath:instancePath+"/dependencies/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/dependencies/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}else {errors = _errs72;if(vErrors !== null){if(_errs72){vErrors.length = _errs72;}else {vErrors = null;}}}}}else {const err35 = {instancePath:instancePath+"/dependencies",schemaPath:"#/properties/dependencies/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data.propertyNames !== undefined){if(!(validate0(data.propertyNames, {instancePath:instancePath+"/propertyNames",parentData:data,parentDataProperty:"propertyNames",rootData}))){vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors);errors = vErrors.length;}}if(data.enum !== undefined){let data37 = data.enum;if(Array.isArray(data37)){if(data37.length < 1){const err36 = {instancePath:instancePath+"/enum",schemaPath:"#/properties/enum/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}let i4 = data37.length;let j2;if(i4 > 1){outer0:for(;i4--;){for(j2 = i4; j2--;){if(func0(data37[i4], data37[j2])){const err37 = {instancePath:instancePath+"/enum",schemaPath:"#/properties/enum/uniqueItems",keyword:"uniqueItems",params:{i: i4, j: j2},message:"must NOT have duplicate items (items ## "+j2+" and "+i4+" are identical)"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;break outer0;}}}}}else {const err38 = {instancePath:instancePath+"/enum",schemaPath:"#/properties/enum/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}if(data.type !== undefined){let data38 = data.type;const _errs83 = errors;let valid20 = false;const _errs84 = errors;if(!(((((((data38 === "array") || (data38 === "boolean")) || (data38 === "integer")) || (data38 === "null")) || (data38 === "number")) || (data38 === "object")) || (data38 === "string"))){const err39 = {instancePath:instancePath+"/type",schemaPath:"#/definitions/simpleTypes/enum",keyword:"enum",params:{allowedValues: schema9.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}var _valid2 = _errs84 === errors;valid20 = valid20 || _valid2;if(!valid20){const _errs86 = errors;if(Array.isArray(data38)){if(data38.length < 1){const err40 = {instancePath:instancePath+"/type",schemaPath:"#/properties/type/anyOf/1/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}const len2 = data38.length;for(let i5=0; i5<len2; i5++){let data39 = data38[i5];if(!(((((((data39 === "array") || (data39 === "boolean")) || (data39 === "integer")) || (data39 === "null")) || (data39 === "number")) || (data39 === "object")) || (data39 === "string"))){const err41 = {instancePath:instancePath+"/type/" + i5,schemaPath:"#/definitions/simpleTypes/enum",keyword:"enum",params:{allowedValues: schema9.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}let i6 = data38.length;let j3;if(i6 > 1){outer1:for(;i6--;){for(j3 = i6; j3--;){if(func0(data38[i6], data38[j3])){const err42 = {instancePath:instancePath+"/type",schemaPath:"#/properties/type/anyOf/1/uniqueItems",keyword:"uniqueItems",params:{i: i6, j: j3},message:"must NOT have duplicate items (items ## "+j3+" and "+i6+" are identical)"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;break outer1;}}}}}else {const err43 = {instancePath:instancePath+"/type",schemaPath:"#/properties/type/anyOf/1/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}var _valid2 = _errs86 === errors;valid20 = valid20 || _valid2;}if(!valid20){const err44 = {instancePath:instancePath+"/type",schemaPath:"#/properties/type/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}else {errors = _errs83;if(vErrors !== null){if(_errs83){vErrors.length = _errs83;}else {vErrors = null;}}}}if(data.format !== undefined){if(typeof data.format !== "string"){const err45 = {instancePath:instancePath+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}if(data.contentMediaType !== undefined){if(typeof data.contentMediaType !== "string"){const err46 = {instancePath:instancePath+"/contentMediaType",schemaPath:"#/properties/contentMediaType/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data.contentEncoding !== undefined){if(typeof data.contentEncoding !== "string"){const err47 = {instancePath:instancePath+"/contentEncoding",schemaPath:"#/properties/contentEncoding/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data.if !== undefined){if(!(validate0(data.if, {instancePath:instancePath+"/if",parentData:data,parentDataProperty:"if",rootData}))){vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors);errors = vErrors.length;}}if(data.then !== undefined){if(!(validate0(data.then, {instancePath:instancePath+"/then",parentData:data,parentDataProperty:"then",rootData}))){vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors);errors = vErrors.length;}}if(data.else !== undefined){if(!(validate0(data.else, {instancePath:instancePath+"/else",parentData:data,parentDataProperty:"else",rootData}))){vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors);errors = vErrors.length;}}if(data.allOf !== undefined){if(!(validate3(data.allOf, {instancePath:instancePath+"/allOf",parentData:data,parentDataProperty:"allOf",rootData}))){vErrors = vErrors === null ? validate3.errors : vErrors.concat(validate3.errors);errors = vErrors.length;}}if(data.anyOf !== undefined){if(!(validate3(data.anyOf, {instancePath:instancePath+"/anyOf",parentData:data,parentDataProperty:"anyOf",rootData}))){vErrors = vErrors === null ? validate3.errors : vErrors.concat(validate3.errors);errors = vErrors.length;}}if(data.oneOf !== undefined){if(!(validate3(data.oneOf, {instancePath:instancePath+"/oneOf",parentData:data,parentDataProperty:"oneOf",rootData}))){vErrors = vErrors === null ? validate3.errors : vErrors.concat(validate3.errors);errors = vErrors.length;}}if(data.not !== undefined){if(!(validate0(data.not, {instancePath:instancePath+"/not",parentData:data,parentDataProperty:"not",rootData}))){vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors);errors = vErrors.length;}}}validate0.errors = vErrors;return errors === 0;}function validate14(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://somod.json-schema.sodaru.com/parameters/index.json" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!(key0 === "parameters")){const err0 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}if(data.parameters !== undefined){let data0 = data.parameters;if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(Object.keys(data0).length > 64){const err1 = {instancePath:instancePath+"/parameters",schemaPath:"#/properties/parameters/maxProperties",keyword:"maxProperties",params:{limit: 64},message:"must NOT have more than 64 properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key1 in data0){const _errs4 = errors;if(typeof key1 === "string"){if(func2(key1) > 128){const err2 = {instancePath:instancePath+"/parameters",schemaPath:"#/properties/parameters/propertyNames/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters",propertyName:key1};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(func2(key1) < 4){const err3 = {instancePath:instancePath+"/parameters",schemaPath:"#/properties/parameters/propertyNames/minLength",keyword:"minLength",params:{limit: 4},message:"must NOT have fewer than 4 characters",propertyName:key1};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(!pattern0.test(key1)){const err4 = {instancePath:instancePath+"/parameters",schemaPath:"#/properties/parameters/propertyNames/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9-_.]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9-_.]*$"+"\"",propertyName:key1};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(errors > 0){const emErrors0 = {"pattern":[]};const templates0 = {};for(const err5 of vErrors){if((((((err5.keyword !== "errorMessage") && (!err5.emUsed)) && (err5.instancePath === instancePath+"/parameters")) && (err5.keyword in emErrors0)) && (err5.schemaPath.indexOf("#/properties/parameters/propertyNames") === 0)) && (/^\/[^\/]*$/.test(err5.schemaPath.slice(37)))){emErrors0[err5.keyword].push(err5);err5.emUsed = true;}}for(const key2 in emErrors0){if(emErrors0[key2].length){const err6 = {instancePath:instancePath+"/parameters",schemaPath:"#/properties/parameters/propertyNames/errorMessage",keyword:"errorMessage",params:{errors: emErrors0[key2]},message:key2 in templates0 ? templates0[key2]() : schema16.properties.parameters.propertyNames.errorMessage[key2],propertyName:key1};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}const emErrs0 = [];for(const err7 of vErrors){if(!err7.emUsed){emErrs0.push(err7);}}vErrors = emErrs0;errors = emErrs0.length;}var valid1 = _errs4 === errors;if(!valid1){const err8 = {instancePath:instancePath+"/parameters",schemaPath:"#/properties/parameters/propertyNames",keyword:"propertyNames",params:{propertyName: key1},message:"property name must be valid"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}for(const key3 in data0){if(!(validate0(data0[key3], {instancePath:instancePath+"/parameters/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data0,parentDataProperty:key3,rootData}))){vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors);errors = vErrors.length;}}}else {const err9 = {instancePath:instancePath+"/parameters",schemaPath:"#/properties/parameters/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}else {const err10 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}validate14.errors = vErrors;return errors === 0;}