UNPKG

@govtechsg/open-attestation

Version:
919 lines 118 kB
"use strict"; exports["https://schema.openattestation.com/2.0/schema.json"] = validate10; var schema11 = { "title": "Open Attestation Schema 2.0", "$id": "https://schema.openattestation.com/2.0/schema.json", "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "identityProofDns": { "type": "object", "properties": { "type": { "type": "string" }, "location": { "type": "string", "description": "Url of the website referencing to document store" } }, "required": ["type", "location"] }, "identityProofDid": { "type": "object", "properties": { "type": { "type": "string" }, "key": { "type": "string", "description": "Public key associated" } }, "required": ["type", "key"] }, "identityProofDnsDid": { "type": "object", "properties": { "type": { "type": "string" }, "key": { "type": "string", "description": "Public key associated" }, "location": { "type": "string", "description": "Url of the website referencing to document store" } }, "required": ["type", "key", "location"] }, "identityProof": { "type": "object", "anyOf": [{ "$ref": "#/definitions/identityProofDns" }, { "$ref": "#/definitions/identityProofDnsDid" }, { "$ref": "#/definitions/identityProofDid" }] }, "issuer": { "type": "object", "properties": { "id": { "type": "string", "description": "Issuer's id, DID can be used" }, "name": { "type": "string", "description": "Issuer's name" }, "revocation": { "type": "object", "properties": { "type": { "type": "string" }, "location": { "type": "string", "description": "Smart contract address or url of certificate revocation list for Revocation Store type revocation" } } }, "identityProof": { "$ref": "#/definitions/identityProof" } }, "required": ["name", "identityProof"], "additionalProperties": true }, "documentStore": { "allOf": [{ "$ref": "#/definitions/issuer" }, { "type": "object", "properties": { "documentStore": { "type": "string", "description": "Smart contract address of document store" } }, "required": ["documentStore"] }] }, "certificateStore": { "type": "object", "properties": { "name": { "type": "string", "description": "Issuer's name" }, "certificateStore": { "type": "string", "deprecationMessage": "Use documentStore and identityProof instead of this", "description": "Smart contract address of certificate store. Same as documentStore" } }, "required": ["name", "certificateStore"], "additionalProperties": true }, "tokenRegistry": { "allOf": [{ "$ref": "#/definitions/issuer" }, { "type": "object", "properties": { "tokenRegistry": { "type": "string", "description": "Smart contract address of token registry" } }, "required": ["tokenRegistry"] }] } }, "type": "object", "properties": { "id": { "type": "string", "description": "Internal reference, usually serial number, of this document" }, "$template": { "oneOf": [{ "type": "string" }, { "type": "object", "properties": { "name": { "type": "string", "description": "Template name to be use by template renderer to determine the template to use" }, "type": { "type": "string", "description": "Type of renderer template" }, "url": { "type": "string", "description": "URL of a decentralised renderer to render this document" } }, "required": ["name", "type"] }] }, "documentUrl": { "type": "string", "description": "URL of the stored document" }, "issuers": { "type": "array", "items": { "type": "object", "title": "issuer", "oneOf": [{ "$ref": "#/definitions/tokenRegistry" }, { "$ref": "#/definitions/documentStore" }, { "$ref": "#/definitions/certificateStore" }, { "allOf": [{ "$ref": "#/definitions/issuer" }, { "not": { "anyOf": [{ "required": ["certificateStore"] }, { "required": ["tokenRegistry"] }, { "required": ["documentStore"] }] } }] }] }, "minItems": 1 }, "recipient": { "type": "object", "properties": { "name": { "type": "string", "description": "Recipient's name" } }, "additionalProperties": true }, "network": { "type": "object", "properties": { "chain": { "type": "string", "description": "Which blockchain being used" }, "chainId": { "type": "string", "description": "Chain ID of the network used" } }, "required": ["chain"], "additionalProperties": true }, "attachments": { "type": "array", "items": { "type": "object", "properties": { "filename": { "type": "string", "description": "Name of attachment, with appropriate extensions" }, "type": { "type": "string", "description": "Type of attachment" }, "data": { "type": "string", "description": "Base64 encoding of attachment" } }, "required": ["filename", "type", "data"], "additionalProperties": false } } }, "required": ["issuers"], "additionalProperties": true }; var schema19 = { "type": "object", "properties": { "name": { "type": "string", "description": "Issuer's name" }, "certificateStore": { "type": "string", "deprecationMessage": "Use documentStore and identityProof instead of this", "description": "Smart contract address of certificate store. Same as documentStore" } }, "required": ["name", "certificateStore"], "additionalProperties": true }; var schema12 = { "allOf": [{ "$ref": "#/definitions/issuer" }, { "type": "object", "properties": { "tokenRegistry": { "type": "string", "description": "Smart contract address of token registry" } }, "required": ["tokenRegistry"] }] }; var schema13 = { "type": "object", "properties": { "id": { "type": "string", "description": "Issuer's id, DID can be used" }, "name": { "type": "string", "description": "Issuer's name" }, "revocation": { "type": "object", "properties": { "type": { "type": "string" }, "location": { "type": "string", "description": "Smart contract address or url of certificate revocation list for Revocation Store type revocation" } } }, "identityProof": { "$ref": "#/definitions/identityProof" } }, "required": ["name", "identityProof"], "additionalProperties": true }; var schema14 = { "type": "object", "anyOf": [{ "$ref": "#/definitions/identityProofDns" }, { "$ref": "#/definitions/identityProofDnsDid" }, { "$ref": "#/definitions/identityProofDid" }] }; var schema15 = { "type": "object", "properties": { "type": { "type": "string" }, "location": { "type": "string", "description": "Url of the website referencing to document store" } }, "required": ["type", "location"] }; var schema16 = { "type": "object", "properties": { "type": { "type": "string" }, "key": { "type": "string", "description": "Public key associated" }, "location": { "type": "string", "description": "Url of the website referencing to document store" } }, "required": ["type", "key", "location"] }; var schema17 = { "type": "object", "properties": { "type": { "type": "string" }, "key": { "type": "string", "description": "Public key associated" } }, "required": ["type", "key"] }; function validate13(data, _a) { var _b = _a === void 0 ? {} : _a, _c = _b.instancePath, instancePath = _c === void 0 ? "" : _c, parentData = _b.parentData, parentDataProperty = _b.parentDataProperty, _d = _b.rootData, rootData = _d === void 0 ? data : _d; var vErrors = null; var errors = 0; if (!(data && typeof data == "object" && !Array.isArray(data))) { var err0 = { instancePath: instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }; if (vErrors === null) { vErrors = [err0]; } else { vErrors.push(err0); } errors++; } var _errs1 = errors; var valid0 = false; var _errs2 = errors; if (data && typeof data == "object" && !Array.isArray(data)) { if (data.type === undefined) { var err1 = { instancePath: instancePath, schemaPath: "#/definitions/identityProofDns/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property '" + "type" + "'" }; if (vErrors === null) { vErrors = [err1]; } else { vErrors.push(err1); } errors++; } if (data.location === undefined) { var err2 = { instancePath: instancePath, schemaPath: "#/definitions/identityProofDns/required", keyword: "required", params: { missingProperty: "location" }, message: "must have required property '" + "location" + "'" }; if (vErrors === null) { vErrors = [err2]; } else { vErrors.push(err2); } errors++; } if (data.type !== undefined) { if (typeof data.type !== "string") { var err3 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/identityProofDns/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err3]; } else { vErrors.push(err3); } errors++; } } if (data.location !== undefined) { if (typeof data.location !== "string") { var err4 = { instancePath: instancePath + "/location", schemaPath: "#/definitions/identityProofDns/properties/location/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err4]; } else { vErrors.push(err4); } errors++; } } } else { var err5 = { instancePath: instancePath, schemaPath: "#/definitions/identityProofDns/type", keyword: "type", params: { type: "object" }, message: "must be object" }; if (vErrors === null) { vErrors = [err5]; } else { vErrors.push(err5); } errors++; } var _valid0 = _errs2 === errors; valid0 = valid0 || _valid0; if (!valid0) { var _errs9 = errors; if (data && typeof data == "object" && !Array.isArray(data)) { if (data.type === undefined) { var err6 = { instancePath: instancePath, schemaPath: "#/definitions/identityProofDnsDid/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property '" + "type" + "'" }; if (vErrors === null) { vErrors = [err6]; } else { vErrors.push(err6); } errors++; } if (data.key === undefined) { var err7 = { instancePath: instancePath, schemaPath: "#/definitions/identityProofDnsDid/required", keyword: "required", params: { missingProperty: "key" }, message: "must have required property '" + "key" + "'" }; if (vErrors === null) { vErrors = [err7]; } else { vErrors.push(err7); } errors++; } if (data.location === undefined) { var err8 = { instancePath: instancePath, schemaPath: "#/definitions/identityProofDnsDid/required", keyword: "required", params: { missingProperty: "location" }, message: "must have required property '" + "location" + "'" }; if (vErrors === null) { vErrors = [err8]; } else { vErrors.push(err8); } errors++; } if (data.type !== undefined) { if (typeof data.type !== "string") { var err9 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/identityProofDnsDid/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err9]; } else { vErrors.push(err9); } errors++; } } if (data.key !== undefined) { if (typeof data.key !== "string") { var err10 = { instancePath: instancePath + "/key", schemaPath: "#/definitions/identityProofDnsDid/properties/key/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err10]; } else { vErrors.push(err10); } errors++; } } if (data.location !== undefined) { if (typeof data.location !== "string") { var err11 = { instancePath: instancePath + "/location", schemaPath: "#/definitions/identityProofDnsDid/properties/location/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err11]; } else { vErrors.push(err11); } errors++; } } } else { var err12 = { instancePath: instancePath, schemaPath: "#/definitions/identityProofDnsDid/type", keyword: "type", params: { type: "object" }, message: "must be object" }; if (vErrors === null) { vErrors = [err12]; } else { vErrors.push(err12); } errors++; } var _valid0 = _errs9 === errors; valid0 = valid0 || _valid0; if (!valid0) { var _errs18 = errors; if (data && typeof data == "object" && !Array.isArray(data)) { if (data.type === undefined) { var err13 = { instancePath: instancePath, schemaPath: "#/definitions/identityProofDid/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property '" + "type" + "'" }; if (vErrors === null) { vErrors = [err13]; } else { vErrors.push(err13); } errors++; } if (data.key === undefined) { var err14 = { instancePath: instancePath, schemaPath: "#/definitions/identityProofDid/required", keyword: "required", params: { missingProperty: "key" }, message: "must have required property '" + "key" + "'" }; if (vErrors === null) { vErrors = [err14]; } else { vErrors.push(err14); } errors++; } if (data.type !== undefined) { if (typeof data.type !== "string") { var err15 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/identityProofDid/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err15]; } else { vErrors.push(err15); } errors++; } } if (data.key !== undefined) { if (typeof data.key !== "string") { var err16 = { instancePath: instancePath + "/key", schemaPath: "#/definitions/identityProofDid/properties/key/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err16]; } else { vErrors.push(err16); } errors++; } } } else { var err17 = { instancePath: instancePath, schemaPath: "#/definitions/identityProofDid/type", keyword: "type", params: { type: "object" }, message: "must be object" }; if (vErrors === null) { vErrors = [err17]; } else { vErrors.push(err17); } errors++; } var _valid0 = _errs18 === errors; valid0 = valid0 || _valid0; } } if (!valid0) { var err18 = { instancePath: instancePath, schemaPath: "#/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" }; if (vErrors === null) { vErrors = [err18]; } else { vErrors.push(err18); } errors++; } else { errors = _errs1; if (vErrors !== null) { if (_errs1) { vErrors.length = _errs1; } else { vErrors = null; } } } validate13.errors = vErrors; return errors === 0; } function validate12(data, _a) { var _b = _a === void 0 ? {} : _a, _c = _b.instancePath, instancePath = _c === void 0 ? "" : _c, parentData = _b.parentData, parentDataProperty = _b.parentDataProperty, _d = _b.rootData, rootData = _d === void 0 ? data : _d; var vErrors = null; var errors = 0; if (data && typeof data == "object" && !Array.isArray(data)) { if (data.name === undefined) { var err0 = { instancePath: instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property '" + "name" + "'" }; if (vErrors === null) { vErrors = [err0]; } else { vErrors.push(err0); } errors++; } if (data.identityProof === undefined) { var err1 = { instancePath: instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "identityProof" }, message: "must have required property '" + "identityProof" + "'" }; if (vErrors === null) { vErrors = [err1]; } else { vErrors.push(err1); } errors++; } if (data.id !== undefined) { if (typeof data.id !== "string") { var err2 = { instancePath: instancePath + "/id", schemaPath: "#/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err2]; } else { vErrors.push(err2); } errors++; } } if (data.name !== undefined) { if (typeof data.name !== "string") { var err3 = { instancePath: instancePath + "/name", schemaPath: "#/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err3]; } else { vErrors.push(err3); } errors++; } } if (data.revocation !== undefined) { var data2 = data.revocation; if (data2 && typeof data2 == "object" && !Array.isArray(data2)) { if (data2.type !== undefined) { if (typeof data2.type !== "string") { var err4 = { instancePath: instancePath + "/revocation/type", schemaPath: "#/properties/revocation/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err4]; } else { vErrors.push(err4); } errors++; } } if (data2.location !== undefined) { if (typeof data2.location !== "string") { var err5 = { instancePath: instancePath + "/revocation/location", schemaPath: "#/properties/revocation/properties/location/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err5]; } else { vErrors.push(err5); } errors++; } } } else { var err6 = { instancePath: instancePath + "/revocation", schemaPath: "#/properties/revocation/type", keyword: "type", params: { type: "object" }, message: "must be object" }; if (vErrors === null) { vErrors = [err6]; } else { vErrors.push(err6); } errors++; } } if (data.identityProof !== undefined) { if (!(validate13(data.identityProof, { instancePath: instancePath + "/identityProof", parentData: data, parentDataProperty: "identityProof", rootData: rootData }))) { vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors); errors = vErrors.length; } } } else { var err7 = { instancePath: instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }; if (vErrors === null) { vErrors = [err7]; } else { vErrors.push(err7); } errors++; } validate12.errors = vErrors; return errors === 0; } function validate11(data, _a) { var _b = _a === void 0 ? {} : _a, _c = _b.instancePath, instancePath = _c === void 0 ? "" : _c, parentData = _b.parentData, parentDataProperty = _b.parentDataProperty, _d = _b.rootData, rootData = _d === void 0 ? data : _d; var vErrors = null; var errors = 0; if (!(validate12(data, { instancePath: instancePath, parentData: parentData, parentDataProperty: parentDataProperty, rootData: rootData }))) { vErrors = vErrors === null ? validate12.errors : vErrors.concat(validate12.errors); errors = vErrors.length; } if (data && typeof data == "object" && !Array.isArray(data)) { if (data.tokenRegistry === undefined) { var err0 = { instancePath: instancePath, schemaPath: "#/allOf/1/required", keyword: "required", params: { missingProperty: "tokenRegistry" }, message: "must have required property '" + "tokenRegistry" + "'" }; if (vErrors === null) { vErrors = [err0]; } else { vErrors.push(err0); } errors++; } if (data.tokenRegistry !== undefined) { if (typeof data.tokenRegistry !== "string") { var err1 = { instancePath: instancePath + "/tokenRegistry", schemaPath: "#/allOf/1/properties/tokenRegistry/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err1]; } else { vErrors.push(err1); } errors++; } } } else { var err2 = { instancePath: instancePath, schemaPath: "#/allOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" }; if (vErrors === null) { vErrors = [err2]; } else { vErrors.push(err2); } errors++; } validate11.errors = vErrors; return errors === 0; } var schema18 = { "allOf": [{ "$ref": "#/definitions/issuer" }, { "type": "object", "properties": { "documentStore": { "type": "string", "description": "Smart contract address of document store" } }, "required": ["documentStore"] }] }; function validate17(data, _a) { var _b = _a === void 0 ? {} : _a, _c = _b.instancePath, instancePath = _c === void 0 ? "" : _c, parentData = _b.parentData, parentDataProperty = _b.parentDataProperty, _d = _b.rootData, rootData = _d === void 0 ? data : _d; var vErrors = null; var errors = 0; if (!(validate12(data, { instancePath: instancePath, parentData: parentData, parentDataProperty: parentDataProperty, rootData: rootData }))) { vErrors = vErrors === null ? validate12.errors : vErrors.concat(validate12.errors); errors = vErrors.length; } if (data && typeof data == "object" && !Array.isArray(data)) { if (data.documentStore === undefined) { var err0 = { instancePath: instancePath, schemaPath: "#/allOf/1/required", keyword: "required", params: { missingProperty: "documentStore" }, message: "must have required property '" + "documentStore" + "'" }; if (vErrors === null) { vErrors = [err0]; } else { vErrors.push(err0); } errors++; } if (data.documentStore !== undefined) { if (typeof data.documentStore !== "string") { var err1 = { instancePath: instancePath + "/documentStore", schemaPath: "#/allOf/1/properties/documentStore/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err1]; } else { vErrors.push(err1); } errors++; } } } else { var err2 = { instancePath: instancePath, schemaPath: "#/allOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" }; if (vErrors === null) { vErrors = [err2]; } else { vErrors.push(err2); } errors++; } validate17.errors = vErrors; return errors === 0; } function validate10(data, _a) { var _b = _a === void 0 ? {} : _a, _c = _b.instancePath, instancePath = _c === void 0 ? "" : _c, parentData = _b.parentData, parentDataProperty = _b.parentDataProperty, _d = _b.rootData, rootData = _d === void 0 ? data : _d; ; var vErrors = null; var errors = 0; if (data && typeof data == "object" && !Array.isArray(data)) { if (data.issuers === undefined) { var err0 = { instancePath: instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "issuers" }, message: "must have required property '" + "issuers" + "'" }; if (vErrors === null) { vErrors = [err0]; } else { vErrors.push(err0); } errors++; } if (data.id !== undefined) { if (typeof data.id !== "string") { var err1 = { instancePath: instancePath + "/id", schemaPath: "#/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err1]; } else { vErrors.push(err1); } errors++; } } if (data.$template !== undefined) { var data1 = data.$template; var _errs5 = errors; var valid1 = false; var passing0 = null; var _errs6 = errors; if (typeof data1 !== "string") { var err2 = { instancePath: instancePath + "/$template", schemaPath: "#/properties/%24template/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err2]; } else { vErrors.push(err2); } errors++; } var _valid0 = _errs6 === errors; if (_valid0) { valid1 = true; passing0 = 0; } var _errs8 = errors; if (data1 && typeof data1 == "object" && !Array.isArray(data1)) { if (data1.name === undefined) { var err3 = { instancePath: instancePath + "/$template", schemaPath: "#/properties/%24template/oneOf/1/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property '" + "name" + "'" }; if (vErrors === null) { vErrors = [err3]; } else { vErrors.push(err3); } errors++; } if (data1.type === undefined) { var err4 = { instancePath: instancePath + "/$template", schemaPath: "#/properties/%24template/oneOf/1/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property '" + "type" + "'" }; if (vErrors === null) { vErrors = [err4]; } else { vErrors.push(err4); } errors++; } if (data1.name !== undefined) { if (typeof data1.name !== "string") { var err5 = { instancePath: instancePath + "/$template/name", schemaPath: "#/properties/%24template/oneOf/1/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err5]; } else { vErrors.push(err5); } errors++; } } if (data1.type !== undefined) { if (typeof data1.type !== "string") { var err6 = { instancePath: instancePath + "/$template/type", schemaPath: "#/properties/%24template/oneOf/1/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err6]; } else { vErrors.push(err6); } errors++; } } if (data1.url !== undefined) { if (typeof data1.url !== "string") { var err7 = { instancePath: instancePath + "/$template/url", schemaPath: "#/properties/%24template/oneOf/1/properties/url/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err7]; } else { vErrors.push(err7); } errors++; } } } else { var err8 = { instancePath: instancePath + "/$template", schemaPath: "#/properties/%24template/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" }; if (vErrors === null) { vErrors = [err8]; } else { vErrors.push(err8); } errors++; } var _valid0 = _errs8 === errors; if (_valid0 && valid1) { valid1 = false; passing0 = [passing0, 1]; } else { if (_valid0) { valid1 = true; passing0 = 1; } } if (!valid1) { var err9 = { instancePath: instancePath + "/$template", schemaPath: "#/properties/%24template/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" }; if (vErrors === null) { vErrors = [err9]; } else { vErrors.push(err9); } errors++; } else { errors = _errs5; if (vErrors !== null) { if (_errs5) { vErrors.length = _errs5; } else { vErrors = null; } } } } if (data.documentUrl !== undefined) { if (typeof data.documentUrl !== "string") { var err10 = { instancePath: instancePath + "/documentUrl", schemaPath: "#/properties/documentUrl/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err10]; } else { vErrors.push(err10); } errors++; } } if (data.issuers !== undefined) { var data6 = data.issuers; if (Array.isArray(data6)) { if (data6.length < 1) { var err11 = { instancePath: instancePath + "/issuers", schemaPath: "#/properties/issuers/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }; if (vErrors === null) { vErrors = [err11]; } else { vErrors.push(err11); } errors++; } var len0 = data6.length; for (var i0 = 0; i0 < len0; i0++) { var data7 = data6[i0]; if (!(data7 && typeof data7 == "object" && !Array.isArray(data7))) { var err12 = { instancePath: instancePath + "/issuers/" + i0, schemaPath: "#/properties/issuers/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }; if (vErrors === null) { vErrors = [err12]; } else { vErrors.push(err12); } errors++; } var _errs22 = errors; var valid5 = false; var passing1 = null; var _errs23 = errors; if (!(validate11(data7, { instancePath: instancePath + "/issuers/" + i0, parentData: data6, parentDataProperty: i0, rootData: rootData }))) { vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors); errors = vErrors.length; } var _valid1 = _errs23 === errors; if (_valid1) { valid5 = true; passing1 = 0; } var _errs24 = errors; if (!(validate17(data7, { instancePath: instancePath + "/issuers/" + i0, parentData: data6, parentDataProperty: i0, rootData: rootData }))) { vErrors = vErrors === null ? validate17.errors : vErrors.concat(validate17.errors); errors = vErrors.length; } var _valid1 = _errs24 === errors; if (_valid1 && valid5) { valid5 = false; passing1 = [passing1, 1]; } else { if (_valid1) { valid5 = true; passing1 = 1; } var _errs25 = errors; if (data7 && typeof data7 == "object" && !Array.isArray(data7)) { if (data7.name === undefined) { var err13 = { instancePath: instancePath + "/issuers/" + i0, schemaPath: "#/definitions/certificateStore/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property '" + "name" + "'" }; if (vErrors === null) { vErrors = [err13]; } else { vErrors.push(err13); } errors++; } if (data7.certificateStore === undefined) { var err14 = { instancePath: instancePath + "/issuers/" + i0, schemaPath: "#/definitions/certificateStore/required", keyword: "required", params: { missingProperty: "certificateStore" }, message: "must have required property '" + "certificateStore" + "'" }; if (vErrors === null) { vErrors = [err14]; } else { vErrors.push(err14); } errors++; } if (data7.name !== undefined) { if (typeof data7.name !== "string") { var err15 = { instancePath: instancePath + "/issuers/" + i0 + "/name", schemaPath: "#/definitions/certificateStore/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err15]; } else { vErrors.push(err15); } errors++; } } if (data7.certificateStore !== undefined) { if (typeof data7.certificateStore !== "string") { var err16 = { instancePath: instancePath + "/issuers/" + i0 + "/certificateStore", schemaPath: "#/definitions/certificateStore/properties/certificateStore/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err16]; } else { vErrors.push(err16); } errors++; } } } else { var err17 = { instancePath: instancePath + "/issuers/" + i0, schemaPath: "#/definitions/certificateStore/type", keyword: "type", params: { type: "object" }, message: "must be object" }; if (vErrors === null) { vErrors = [err17]; } else { vErrors.push(err17); } errors++; } var _valid1 = _errs25 === errors; if (_valid1 && valid5) { valid5 = false; passing1 = [passing1, 2]; } else { if (_valid1) { valid5 = true; passing1 = 2; } var _errs33 = errors; if (!(validate12(data7, { instancePath: instancePath + "/issuers/" + i0, parentData: data6, parentDataProperty: i0, rootData: rootData }))) { vErrors = vErrors === null ? validate12.errors : vErrors.concat(validate12.errors); errors = vErrors.length; } var _errs36 = errors; var _errs37 = errors; var _errs38 = errors; var valid10 = false; var _errs39 = errors; if (data7 && typeof data7 == "object" && !Array.isArray(data7)) { var missing0 = void 0; if ((data7.certificateStore === undefined) && (missing0 = "certificateStore")) { var err18 = {}; if (vErrors === null) { vErrors = [err18]; } else { vErrors.push(err18); } errors++; } } var _valid2 = _errs39 === errors; valid10 = valid10 || _valid2; if (!valid10) { var _errs40 = errors; if (data7 && typeof data7 == "object" && !Array.isArray(data7)) { var missing1 = void 0; if ((data7.tokenRegistry === undefined) && (missing1 = "tokenRegistry")) { var err19 = {}; if (vErrors === null) { vErrors = [err19]; } else { vErrors.push(err19); } errors++; } } var _valid2 = _errs40 === errors; valid10 = valid10 || _valid2; if (!valid10) { var _errs41 = errors; if (data7 && typeof data7 == "object" && !Array.isArray(data7)) { var missing2 = void 0; if ((data7.documentStore === undefined) && (missing2 = "documentStore")) { var err20 = {}; if (vErrors === null) { vErrors = [err20]; } else { vErrors.push(err20); } errors++; } } var _valid2 = _errs41 === errors; valid10 = valid10 || _valid2; } } if (!valid10) { var err21 = {}; if (vErrors === null) { vErrors = [err21]; } else { vErrors.push(err21); } errors++; } else { errors = _errs38; if (vErrors !== null) { if (_errs38) { vErrors.length = _errs38; } else { vErrors = null; } } } var valid9 = _errs37 === errors; if (valid9) { var err22 = { instancePath: instancePath + "/issuers/" + i0, schemaPath: "#/properties/issuers/items/oneOf/3/allOf/1/not", keyword: "not", params: {}, message: "must NOT be valid" }; if (vErrors === null) { vErrors = [err22]; } else { vErrors.push(err22); } errors++; } else { errors = _errs36; if (vErrors !== null) { if (_errs36) { vErrors.length = _errs36; } else { vErrors = null; } } } var _valid1 = _errs33 === errors; if (_valid1 && valid5) { valid5 = false; passing1 = [passing1, 3]; } else { if (_valid1) { valid5 = true; passing1 = 3; } } } } if (!valid5) { var err23 = { instancePath: instancePath + "/issuers/" + i0, schemaPath: "#/properties/issuers/items/oneOf", keyword: "oneOf", params: { passingSchemas: passing1 }, message: "must match exactly one schema in oneOf" }; if (vErrors === null) { vErrors = [err23]; } else { vErrors.push(err23); } errors++; } else { errors = _errs22; if (vErrors !== null) { if (_errs22) { vErrors.length = _errs22; } else { vErrors = null; } } } } } else { var err24 = { instancePath: instancePath + "/issuers", schemaPath: "#/properties/issuers/type", keyword: "type", params: { type: "array" }, message: "must be array" }; if (vErrors === null) { vErrors = [err24]; } else { vErrors.push(err24); } errors++; } } if (data.recipient !== undefined) { var data10 = data.recipient; if (data10 && typeof data10 == "object" && !Array.isArray(data10)) { if (data10.name !== undefined) { if (typeof data10.name !== "string") { var err25 = { instancePath: instancePath + "/recipient/name", schemaPath: "#/properties/recipient/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }; if (vErrors === null) { vErrors = [err25]; } else { vErrors.push(err25); } errors++; } } } else { var err26 = { instancePath: instancePath + "/recipient", schemaPath: "#/properties/recipient/type", keyword: "type", params: { type: "object" }, message: "must be object" }; if (vErrors === null) { vErrors = [err26]; } else { vErrors.push(err26); } errors++; } } if (data.network !== undefined) { var data12 = data.network; if (data12 && typeof data12 == "object" && !Array.isArray(data12)) { if (data12.chain === undefined) { var err27 = { instancePath: instancePath + "/network", schemaPath: "#/properties/network/required", keyword: "required", params: { missingProperty: "chain" }, message: "must have r