@akashnetwork/chain-sdk 1.0.0-alpha.30 → 1.0.0-alpha.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/bla.cjs +7 -0
- package/dist/cjs/bla.cjs.map +7 -0
- package/dist/cjs/generated/createNodeSDK.cjs +95 -76
- package/dist/cjs/generated/createNodeSDK.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/bme/v1/params.cjs +18 -2
- package/dist/cjs/generated/protos/akash/bme/v1/params.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/bme/v1/types.cjs +65 -2
- package/dist/cjs/generated/protos/akash/bme/v1/types.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/deployment/v1/deployment.cjs +68 -2
- package/dist/cjs/generated/protos/akash/deployment/v1/deployment.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/deployment/v1beta4/deploymentmsg.cjs +17 -2
- package/dist/cjs/generated/protos/akash/deployment/v1beta4/deploymentmsg.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/discovery/v1/akash.cjs +64 -2
- package/dist/cjs/generated/protos/akash/discovery/v1/akash.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/discovery/v1/client_info.cjs +150 -1
- package/dist/cjs/generated/protos/akash/discovery/v1/client_info.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/discovery/v1/service.cjs +115 -0
- package/dist/cjs/generated/protos/akash/discovery/v1/service.cjs.map +7 -0
- package/dist/cjs/generated/protos/akash/discovery/v1/service_akash.cjs +39 -0
- package/dist/cjs/generated/protos/akash/discovery/v1/service_akash.cjs.map +7 -0
- package/dist/cjs/generated/protos/akash/market/v1/event.cjs +93 -0
- package/dist/cjs/generated/protos/akash/market/v1/event.cjs.map +3 -3
- package/dist/cjs/generated/protos/akash/market/v1/lease.cjs +32 -2
- package/dist/cjs/generated/protos/akash/market/v1/lease.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/market/v1/reclamation.cjs +138 -0
- package/dist/cjs/generated/protos/akash/market/v1/reclamation.cjs.map +7 -0
- package/dist/cjs/generated/protos/akash/market/v1beta5/bid.cjs +25 -2
- package/dist/cjs/generated/protos/akash/market/v1beta5/bid.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/market/v1beta5/bidmsg.cjs +18 -2
- package/dist/cjs/generated/protos/akash/market/v1beta5/bidmsg.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/market/v1beta5/leasemsg.cjs +103 -0
- package/dist/cjs/generated/protos/akash/market/v1beta5/leasemsg.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/market/v1beta5/order.cjs +18 -2
- package/dist/cjs/generated/protos/akash/market/v1beta5/order.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/market/v1beta5/params.cjs +39 -2
- package/dist/cjs/generated/protos/akash/market/v1beta5/params.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/market/v1beta5/service_akash.cjs +8 -0
- package/dist/cjs/generated/protos/akash/market/v1beta5/service_akash.cjs.map +2 -2
- package/dist/cjs/generated/protos/index.akash.v1.cjs +9 -0
- package/dist/cjs/generated/protos/index.akash.v1.cjs.map +2 -2
- package/dist/cjs/generated/protos/index.akash.v1beta5.cjs +2 -0
- package/dist/cjs/generated/protos/index.akash.v1beta5.cjs.map +2 -2
- package/dist/cjs/network/config.cjs +3 -7
- package/dist/cjs/network/config.cjs.map +2 -2
- package/dist/cjs/sdk/provider/auth/jwt/types.cjs.map +1 -1
- package/dist/cjs/sdk/provider/auth/jwt/validateJwtPayload.cjs +1058 -1259
- package/dist/cjs/sdk/provider/auth/jwt/validateJwtPayload.cjs.map +2 -2
- package/dist/cjs/sdl/index.cjs +0 -4
- package/dist/cjs/sdl/index.cjs.map +2 -2
- package/dist/cjs/sdl/manifest/generateManifest.cjs +2 -3
- package/dist/cjs/sdl/manifest/generateManifest.cjs.map +2 -2
- package/dist/cjs/sdl/validateSDL/validateSDL.cjs +4 -36
- package/dist/cjs/sdl/validateSDL/validateSDL.cjs.map +2 -2
- package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs +49 -50
- package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs.map +2 -2
- package/dist/cjs/test.cjs +2 -0
- package/dist/cjs/test.cjs.map +7 -0
- package/dist/esm/{chunk-JAPXWQ3D.js → chunk-7XWZXYD2.js} +2 -2
- package/dist/esm/{chunk-5RTSSO7K.js → chunk-B7H4H62Z.js} +3 -3
- package/dist/esm/chunk-E4KEMLL4.js +413 -0
- package/dist/esm/chunk-E4KEMLL4.js.map +7 -0
- package/dist/esm/{chunk-H5WUFEMM.js → chunk-EG6EVQGI.js} +23 -5
- package/dist/esm/chunk-EG6EVQGI.js.map +7 -0
- package/dist/esm/{chunk-5YIS3XNX.js → chunk-EXKSXOV2.js} +2 -2
- package/dist/esm/{chunk-TXQ2BR6G.js → chunk-IFAXXMON.js} +126 -5
- package/dist/esm/chunk-IFAXXMON.js.map +7 -0
- package/dist/esm/chunk-IMR6WS6F.js +93 -0
- package/dist/esm/chunk-IMR6WS6F.js.map +7 -0
- package/dist/esm/{chunk-LKYHOABO.js → chunk-IPOIF4A2.js} +170 -37
- package/dist/esm/chunk-IPOIF4A2.js.map +7 -0
- package/dist/esm/{chunk-PFJG3V3A.js → chunk-ITPLCNJB.js} +84 -5
- package/dist/esm/chunk-ITPLCNJB.js.map +7 -0
- package/dist/esm/{chunk-YSOG5YCI.js → chunk-KM336UKV.js} +1203 -2125
- package/dist/esm/chunk-KM336UKV.js.map +7 -0
- package/dist/esm/{chunk-KFWTFROT.js → chunk-M5SAGBGR.js} +42 -3
- package/dist/esm/chunk-M5SAGBGR.js.map +7 -0
- package/dist/esm/{chunk-OHAEKHAC.js → chunk-NPGGO3JN.js} +37 -55
- package/dist/esm/chunk-NPGGO3JN.js.map +7 -0
- package/dist/esm/{chunk-HDAINZXA.js → chunk-RKOP2GYL.js} +50 -7
- package/dist/esm/chunk-RKOP2GYL.js.map +7 -0
- package/dist/esm/{chunk-VZZ4GN23.js → chunk-T5PKT4I6.js} +6 -4
- package/dist/esm/{chunk-VZZ4GN23.js.map → chunk-T5PKT4I6.js.map} +1 -1
- package/dist/esm/{chunk-B4MMOAAO.js → chunk-WI3EWXXI.js} +2 -2
- package/dist/esm/generated/protos/index.akash.v1.js +180 -182
- package/dist/esm/generated/protos/index.akash.v1.js.map +4 -4
- package/dist/esm/generated/protos/index.akash.v1beta1.js +7 -7
- package/dist/esm/generated/protos/index.akash.v1beta4.js +6 -4
- package/dist/esm/generated/protos/index.akash.v1beta5.js +10 -4
- package/dist/esm/generated/protos/index.akash.v1beta5.js.map +1 -1
- package/dist/esm/generated/protos/index.akash.v2.js +6 -6
- package/dist/esm/generated/protos/index.provider.akash.v1.js +16 -15
- package/dist/esm/index.js +10 -12
- package/dist/esm/index.web.js +9 -11
- package/dist/esm/{query_akash-3UBRLLRZ.js → query_akash-3IY2DKPB.js} +3 -3
- package/dist/esm/{query_akash-CKZRI7R6.js → query_akash-OKZLG4MG.js} +5 -3
- package/dist/esm/{query_akash-CKZRI7R6.js.map → query_akash-OKZLG4MG.js.map} +1 -1
- package/dist/esm/{query_akash-3LAHGVQJ.js → query_akash-ZITEPCYB.js} +6 -4
- package/dist/esm/{query_akash-3LAHGVQJ.js.map → query_akash-ZITEPCYB.js.map} +1 -1
- package/dist/esm/{service_akash-UFTUJDPM.js → service_akash-2CH5FJ4J.js} +3 -3
- package/dist/esm/{service_akash-5JSE44LJ.js → service_akash-BLDT6YCO.js} +5 -3
- package/dist/esm/{service_akash-5JSE44LJ.js.map → service_akash-BLDT6YCO.js.map} +1 -1
- package/dist/esm/{service_akash-QEN5EQUY.js → service_akash-DZETPXWM.js} +15 -4
- package/dist/esm/service_akash-DZETPXWM.js.map +7 -0
- package/dist/esm/service_akash-K7FWCKUQ.js +25 -0
- package/dist/esm/service_akash-K7FWCKUQ.js.map +7 -0
- package/dist/esm/{service_akash-FI6WXDZP.js → service_akash-VOFSDZEK.js} +4 -3
- package/dist/esm/{service_akash-FI6WXDZP.js.map → service_akash-VOFSDZEK.js.map} +1 -1
- package/dist/sdl-schema.yaml +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/bla.d.ts +1 -0
- package/dist/types/generated/createNodeSDK.d.ts +30 -0
- package/dist/types/generated/protos/akash/bme/v1/params.d.ts +5 -0
- package/dist/types/generated/protos/akash/bme/v1/types.d.ts +19 -1
- package/dist/types/generated/protos/akash/deployment/v1/deployment.d.ts +15 -0
- package/dist/types/generated/protos/akash/deployment/v1beta4/deploymentmsg.d.ts +6 -1
- package/dist/types/generated/protos/akash/discovery/v1/akash.d.ts +16 -2
- package/dist/types/generated/protos/akash/discovery/v1/client_info.d.ts +18 -0
- package/dist/types/generated/protos/akash/discovery/v1/service.d.ts +12 -0
- package/dist/types/generated/protos/akash/discovery/v1/service_akash.d.ts +13 -0
- package/dist/types/generated/protos/akash/market/v1/event.d.ts +11 -0
- package/dist/types/generated/protos/akash/market/v1/lease.d.ts +8 -0
- package/dist/types/generated/protos/akash/market/v1/reclamation.d.ts +22 -0
- package/dist/types/generated/protos/akash/market/v1beta5/bid.d.ts +3 -0
- package/dist/types/generated/protos/akash/market/v1beta5/bidmsg.d.ts +7 -0
- package/dist/types/generated/protos/akash/market/v1beta5/leasemsg.d.ts +12 -0
- package/dist/types/generated/protos/akash/market/v1beta5/order.d.ts +6 -0
- package/dist/types/generated/protos/akash/market/v1beta5/params.d.ts +5 -0
- package/dist/types/generated/protos/akash/market/v1beta5/service_akash.d.ts +7 -1
- package/dist/types/generated/protos/index.akash.v1.d.ts +5 -3
- package/dist/types/generated/protos/index.akash.v1beta5.d.ts +1 -1
- package/dist/types/network/config.d.ts +4 -5
- package/dist/types/sdk/chain/createChainNodeSDK.d.ts +6 -0
- package/dist/types/sdk/chain/createChainNodeWebSDK.d.ts +6 -0
- package/dist/types/sdk/chain/helpers.d.ts +1 -1
- package/dist/types/sdk/provider/auth/jwt/types.d.ts +4 -58
- package/dist/types/sdk/provider/auth/jwt/validateJwtPayload.d.ts +273 -225
- package/dist/types/sdl/index.d.ts +0 -2
- package/dist/types/sdl/manifest/generateManifest.d.ts +1 -2
- package/dist/types/sdl/validateSDL/validateSDL.d.ts +2 -3
- package/dist/types/sdl/validateSDL/validateSDLInput.d.ts +5 -5
- package/dist/types/test.d.ts +1 -0
- package/package.json +13 -15
- package/dist/cjs/sdl/SDL/SDL.cjs +0 -718
- package/dist/cjs/sdl/SDL/SDL.cjs.map +0 -7
- package/dist/cjs/sdl/SDL/SdlValidationError.cjs +0 -46
- package/dist/cjs/sdl/SDL/SdlValidationError.cjs.map +0 -7
- package/dist/esm/chunk-H5WUFEMM.js.map +0 -7
- package/dist/esm/chunk-HDAINZXA.js.map +0 -7
- package/dist/esm/chunk-KFWTFROT.js.map +0 -7
- package/dist/esm/chunk-LKYHOABO.js.map +0 -7
- package/dist/esm/chunk-OHAEKHAC.js.map +0 -7
- package/dist/esm/chunk-PFJG3V3A.js.map +0 -7
- package/dist/esm/chunk-TXQ2BR6G.js.map +0 -7
- package/dist/esm/chunk-YSOG5YCI.js.map +0 -7
- package/dist/esm/service_akash-QEN5EQUY.js.map +0 -7
- package/dist/types/sdl/SDL/SDL.d.ts +0 -439
- package/dist/types/sdl/SDL/SdlValidationError.d.ts +0 -18
- /package/dist/esm/{chunk-JAPXWQ3D.js.map → chunk-7XWZXYD2.js.map} +0 -0
- /package/dist/esm/{chunk-5RTSSO7K.js.map → chunk-B7H4H62Z.js.map} +0 -0
- /package/dist/esm/{chunk-5YIS3XNX.js.map → chunk-EXKSXOV2.js.map} +0 -0
- /package/dist/esm/{chunk-B4MMOAAO.js.map → chunk-WI3EWXXI.js.map} +0 -0
- /package/dist/esm/{query_akash-3UBRLLRZ.js.map → query_akash-3IY2DKPB.js.map} +0 -0
- /package/dist/esm/{service_akash-UFTUJDPM.js.map → service_akash-2CH5FJ4J.js.map} +0 -0
|
@@ -53,1446 +53,1245 @@ var require_ucs2length = __commonJS({
|
|
|
53
53
|
});
|
|
54
54
|
var validate = validate10;
|
|
55
55
|
var stdin_default = validate10;
|
|
56
|
-
var schema11 = { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://raw.githubusercontent.com/akash-network/chain-sdk/refs/heads/main/specs/jwt-schema.json", "title": "Akash JWT Schema", "description": "JSON Schema for JWT used in the Akash Provider API.", "type": "object", "additionalProperties": false, "required": ["iss", "iat", "exp", "nbf", "version", "leases"], "properties": { "iss": { "
|
|
56
|
+
var schema11 = { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://raw.githubusercontent.com/akash-network/chain-sdk/refs/heads/main/specs/jwt-schema.json", "title": "Akash JWT Schema", "description": "JSON Schema for JWT used in the Akash Provider API.", "type": "object", "additionalProperties": false, "required": ["iss", "iat", "exp", "nbf", "version", "leases"], "properties": { "iss": { "$ref": "#/definitions/akash-address", "description": "Akash address of the lease(s) owner, e.g., akash1abcd... (44 characters)" }, "iat": { "type": "integer", "minimum": 0, "description": "Token issuance timestamp as Unix time (seconds since 1970-01-01T00:00:00Z). Should be <= exp and >= nbf." }, "nbf": { "type": "integer", "minimum": 0, "description": "Not valid before timestamp as Unix time (seconds since 1970-01-01T00:00:00Z). Should be <= iat." }, "exp": { "type": "integer", "minimum": 0, "description": "Expiration timestamp as Unix time (seconds since 1970-01-01T00:00:00Z). Should be >= iat." }, "jti": { "type": "string", "minLength": 1, "description": "Unique identifier for the JWT, used to prevent token reuse." }, "version": { "type": "string", "enum": ["v1"], "description": "Version of the JWT specification (currently fixed at v1)." }, "leases": { "$ref": "#/definitions/leases" } }, "definitions": { "akash-address": { "type": "string", "pattern": "^akash1[a-z0-9]{38}$" }, "action-scope": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "enum": ["send-manifest", "get-manifest", "logs", "shell", "events", "status", "restart", "hostname-migrate", "ip-migrate"] } }, "leases": { "type": "object", "description": "Access level for the lease: 'full' for unrestricted access to all actions, 'scoped' for specific actions across all provider leases, 'granular' for provider-specific permissions.", "oneOf": [{ "$ref": "#/definitions/leases-full" }, { "$ref": "#/definitions/leases-scoped" }, { "$ref": "#/definitions/leases-granular" }] }, "leases-full": { "type": "object", "additionalProperties": false, "required": ["access"], "properties": { "access": { "const": "full", "description": "Unrestricted access to all actions on all leases." } } }, "leases-scoped": { "type": "object", "additionalProperties": false, "required": ["access", "scope"], "properties": { "access": { "const": "scoped", "description": "Specific actions across all provider leases." }, "scope": { "$ref": "#/definitions/action-scope", "description": "Global list of permitted actions across all owned leases (no duplicates)." } } }, "leases-granular": { "type": "object", "additionalProperties": false, "required": ["access", "permissions"], "properties": { "access": { "const": "granular", "description": "Provider-specific permissions." }, "permissions": { "type": "array", "description": "Defines provider-specific permissions. The provider address must be unique across all permissions entries.", "minItems": 1, "items": { "$ref": "#/definitions/lease-permission" } } } }, "lease-permission": { "type": "object", "description": "Provider-level access: 'full' for all actions, 'scoped' for specific actions across all provider leases, 'granular' for deployment-specific actions.", "oneOf": [{ "$ref": "#/definitions/lease-permission-full" }, { "$ref": "#/definitions/lease-permission-scoped" }, { "$ref": "#/definitions/lease-permission-granular" }] }, "lease-permission-full": { "type": "object", "additionalProperties": false, "required": ["provider", "access"], "properties": { "provider": { "$ref": "#/definitions/akash-address", "description": "Provider address, e.g., akash1xyz... (44 characters)." }, "access": { "const": "full", "description": "Full access to all actions on this provider's leases." } } }, "lease-permission-scoped": { "type": "object", "additionalProperties": false, "required": ["provider", "access", "scope"], "properties": { "provider": { "$ref": "#/definitions/akash-address", "description": "Provider address, e.g., akash1xyz... (44 characters)." }, "access": { "const": "scoped", "description": "Specific actions across all this provider's leases." }, "scope": { "$ref": "#/definitions/action-scope", "description": "Provider-level list of permitted actions (no duplicates)." } } }, "lease-permission-granular": { "type": "object", "additionalProperties": false, "required": ["provider", "access", "deployments"], "properties": { "provider": { "$ref": "#/definitions/akash-address", "description": "Provider address, e.g., akash1xyz... (44 characters)." }, "access": { "const": "granular", "description": "Deployment-specific actions." }, "deployments": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/lease-permission-deployment" } } } }, "lease-permission-deployment": { "type": "object", "additionalProperties": false, "required": ["dseq", "scope", "services"], "properties": { "dseq": { "type": "integer", "minimum": 1, "description": "Deployment sequence number." }, "scope": { "$ref": "#/definitions/action-scope", "description": "Deployment-level list of permitted actions (no duplicates)." }, "gseq": { "type": "integer", "minimum": 0, "description": "Group sequence number (requires dseq)." }, "oseq": { "type": "integer", "minimum": 0, "description": "Order sequence number (requires dseq and gseq)." }, "services": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 }, "description": "List of service names (requires dseq)." } }, "dependencies": { "oseq": ["gseq"] } } } };
|
|
57
57
|
var pattern0 = new RegExp("^akash1[a-z0-9]{38}$", "u");
|
|
58
58
|
var func2 = require_ucs2length().default;
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
var schema16 = { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "enum": ["send-manifest", "get-manifest", "logs", "shell", "events", "status", "restart", "hostname-migrate", "ip-migrate"] } };
|
|
60
|
+
function validate12(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
61
61
|
let vErrors = null;
|
|
62
62
|
let errors = 0;
|
|
63
|
-
const _errs2 = errors;
|
|
64
|
-
let valid1 = true;
|
|
65
|
-
const _errs3 = errors;
|
|
66
63
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const err0 = {};
|
|
64
|
+
if (data.access === void 0) {
|
|
65
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
|
|
70
66
|
if (vErrors === null) {
|
|
71
67
|
vErrors = [err0];
|
|
72
68
|
} else {
|
|
73
69
|
vErrors.push(err0);
|
|
74
70
|
}
|
|
75
71
|
errors++;
|
|
72
|
+
}
|
|
73
|
+
if (data.scope === void 0) {
|
|
74
|
+
const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "scope" }, message: "must have required property 'scope'" };
|
|
75
|
+
if (vErrors === null) {
|
|
76
|
+
vErrors = [err1];
|
|
77
|
+
} else {
|
|
78
|
+
vErrors.push(err1);
|
|
79
|
+
}
|
|
80
|
+
errors++;
|
|
81
|
+
}
|
|
82
|
+
for (const key0 in data) {
|
|
83
|
+
if (!(key0 === "access" || key0 === "scope")) {
|
|
84
|
+
const err2 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
85
|
+
if (vErrors === null) {
|
|
86
|
+
vErrors = [err2];
|
|
87
|
+
} else {
|
|
88
|
+
vErrors.push(err2);
|
|
89
|
+
}
|
|
90
|
+
errors++;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (data.access !== void 0) {
|
|
94
|
+
if ("scoped" !== data.access) {
|
|
95
|
+
const err3 = { instancePath: instancePath + "/access", schemaPath: "#/properties/access/const", keyword: "const", params: { allowedValue: "scoped" }, message: "must be equal to constant" };
|
|
96
|
+
if (vErrors === null) {
|
|
97
|
+
vErrors = [err3];
|
|
98
|
+
} else {
|
|
99
|
+
vErrors.push(err3);
|
|
100
|
+
}
|
|
101
|
+
errors++;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (data.scope !== void 0) {
|
|
105
|
+
let data1 = data.scope;
|
|
106
|
+
if (Array.isArray(data1)) {
|
|
107
|
+
if (data1.length < 1) {
|
|
108
|
+
const err4 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
109
|
+
if (vErrors === null) {
|
|
110
|
+
vErrors = [err4];
|
|
111
|
+
} else {
|
|
112
|
+
vErrors.push(err4);
|
|
113
|
+
}
|
|
114
|
+
errors++;
|
|
115
|
+
}
|
|
116
|
+
const len0 = data1.length;
|
|
117
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
118
|
+
let data2 = data1[i0];
|
|
119
|
+
if (typeof data2 !== "string") {
|
|
120
|
+
const err5 = { instancePath: instancePath + "/scope/" + i0, schemaPath: "#/definitions/action-scope/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
121
|
+
if (vErrors === null) {
|
|
122
|
+
vErrors = [err5];
|
|
123
|
+
} else {
|
|
124
|
+
vErrors.push(err5);
|
|
125
|
+
}
|
|
126
|
+
errors++;
|
|
127
|
+
}
|
|
128
|
+
if (!(data2 === "send-manifest" || data2 === "get-manifest" || data2 === "logs" || data2 === "shell" || data2 === "events" || data2 === "status" || data2 === "restart" || data2 === "hostname-migrate" || data2 === "ip-migrate")) {
|
|
129
|
+
const err6 = { instancePath: instancePath + "/scope/" + i0, schemaPath: "#/definitions/action-scope/items/enum", keyword: "enum", params: { allowedValues: schema16.items.enum }, message: "must be equal to one of the allowed values" };
|
|
130
|
+
if (vErrors === null) {
|
|
131
|
+
vErrors = [err6];
|
|
132
|
+
} else {
|
|
133
|
+
vErrors.push(err6);
|
|
134
|
+
}
|
|
135
|
+
errors++;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
let i1 = data1.length;
|
|
139
|
+
let j0;
|
|
140
|
+
if (i1 > 1) {
|
|
141
|
+
const indices0 = {};
|
|
142
|
+
for (; i1--; ) {
|
|
143
|
+
let item0 = data1[i1];
|
|
144
|
+
if (typeof item0 !== "string") {
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
if (typeof indices0[item0] == "number") {
|
|
148
|
+
j0 = indices0[item0];
|
|
149
|
+
const err7 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" };
|
|
150
|
+
if (vErrors === null) {
|
|
151
|
+
vErrors = [err7];
|
|
152
|
+
} else {
|
|
153
|
+
vErrors.push(err7);
|
|
154
|
+
}
|
|
155
|
+
errors++;
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
indices0[item0] = i1;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
} else {
|
|
162
|
+
const err8 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
163
|
+
if (vErrors === null) {
|
|
164
|
+
vErrors = [err8];
|
|
165
|
+
} else {
|
|
166
|
+
vErrors.push(err8);
|
|
167
|
+
}
|
|
168
|
+
errors++;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
} else {
|
|
172
|
+
const err9 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
173
|
+
if (vErrors === null) {
|
|
174
|
+
vErrors = [err9];
|
|
76
175
|
} else {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
176
|
+
vErrors.push(err9);
|
|
177
|
+
}
|
|
178
|
+
errors++;
|
|
179
|
+
}
|
|
180
|
+
validate12.errors = vErrors;
|
|
181
|
+
return errors === 0;
|
|
182
|
+
}
|
|
183
|
+
function validate16(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
184
|
+
let vErrors = null;
|
|
185
|
+
let errors = 0;
|
|
186
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
187
|
+
if (data.provider === void 0) {
|
|
188
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "provider" }, message: "must have required property 'provider'" };
|
|
189
|
+
if (vErrors === null) {
|
|
190
|
+
vErrors = [err0];
|
|
191
|
+
} else {
|
|
192
|
+
vErrors.push(err0);
|
|
193
|
+
}
|
|
194
|
+
errors++;
|
|
195
|
+
}
|
|
196
|
+
if (data.access === void 0) {
|
|
197
|
+
const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
|
|
198
|
+
if (vErrors === null) {
|
|
199
|
+
vErrors = [err1];
|
|
200
|
+
} else {
|
|
201
|
+
vErrors.push(err1);
|
|
202
|
+
}
|
|
203
|
+
errors++;
|
|
204
|
+
}
|
|
205
|
+
for (const key0 in data) {
|
|
206
|
+
if (!(key0 === "provider" || key0 === "access")) {
|
|
207
|
+
const err2 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
208
|
+
if (vErrors === null) {
|
|
209
|
+
vErrors = [err2];
|
|
210
|
+
} else {
|
|
211
|
+
vErrors.push(err2);
|
|
212
|
+
}
|
|
213
|
+
errors++;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
if (data.provider !== void 0) {
|
|
217
|
+
let data0 = data.provider;
|
|
218
|
+
if (typeof data0 === "string") {
|
|
219
|
+
if (!pattern0.test(data0)) {
|
|
220
|
+
const err3 = { instancePath: instancePath + "/provider", schemaPath: "#/definitions/akash-address/pattern", keyword: "pattern", params: { pattern: "^akash1[a-z0-9]{38}$" }, message: 'must match pattern "^akash1[a-z0-9]{38}$"' };
|
|
221
|
+
if (vErrors === null) {
|
|
222
|
+
vErrors = [err3];
|
|
223
|
+
} else {
|
|
224
|
+
vErrors.push(err3);
|
|
225
|
+
}
|
|
226
|
+
errors++;
|
|
227
|
+
}
|
|
228
|
+
} else {
|
|
229
|
+
const err4 = { instancePath: instancePath + "/provider", schemaPath: "#/definitions/akash-address/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
230
|
+
if (vErrors === null) {
|
|
231
|
+
vErrors = [err4];
|
|
232
|
+
} else {
|
|
233
|
+
vErrors.push(err4);
|
|
234
|
+
}
|
|
235
|
+
errors++;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
if (data.access !== void 0) {
|
|
239
|
+
if ("full" !== data.access) {
|
|
240
|
+
const err5 = { instancePath: instancePath + "/access", schemaPath: "#/properties/access/const", keyword: "const", params: { allowedValue: "full" }, message: "must be equal to constant" };
|
|
241
|
+
if (vErrors === null) {
|
|
242
|
+
vErrors = [err5];
|
|
243
|
+
} else {
|
|
244
|
+
vErrors.push(err5);
|
|
245
|
+
}
|
|
246
|
+
errors++;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
250
|
+
const err6 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
251
|
+
if (vErrors === null) {
|
|
252
|
+
vErrors = [err6];
|
|
253
|
+
} else {
|
|
254
|
+
vErrors.push(err6);
|
|
255
|
+
}
|
|
256
|
+
errors++;
|
|
257
|
+
}
|
|
258
|
+
validate16.errors = vErrors;
|
|
259
|
+
return errors === 0;
|
|
260
|
+
}
|
|
261
|
+
function validate18(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
262
|
+
let vErrors = null;
|
|
263
|
+
let errors = 0;
|
|
264
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
265
|
+
if (data.provider === void 0) {
|
|
266
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "provider" }, message: "must have required property 'provider'" };
|
|
267
|
+
if (vErrors === null) {
|
|
268
|
+
vErrors = [err0];
|
|
269
|
+
} else {
|
|
270
|
+
vErrors.push(err0);
|
|
271
|
+
}
|
|
272
|
+
errors++;
|
|
273
|
+
}
|
|
274
|
+
if (data.access === void 0) {
|
|
275
|
+
const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
|
|
276
|
+
if (vErrors === null) {
|
|
277
|
+
vErrors = [err1];
|
|
278
|
+
} else {
|
|
279
|
+
vErrors.push(err1);
|
|
280
|
+
}
|
|
281
|
+
errors++;
|
|
282
|
+
}
|
|
283
|
+
if (data.scope === void 0) {
|
|
284
|
+
const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "scope" }, message: "must have required property 'scope'" };
|
|
285
|
+
if (vErrors === null) {
|
|
286
|
+
vErrors = [err2];
|
|
287
|
+
} else {
|
|
288
|
+
vErrors.push(err2);
|
|
289
|
+
}
|
|
290
|
+
errors++;
|
|
291
|
+
}
|
|
292
|
+
for (const key0 in data) {
|
|
293
|
+
if (!(key0 === "provider" || key0 === "access" || key0 === "scope")) {
|
|
294
|
+
const err3 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
295
|
+
if (vErrors === null) {
|
|
296
|
+
vErrors = [err3];
|
|
297
|
+
} else {
|
|
298
|
+
vErrors.push(err3);
|
|
299
|
+
}
|
|
300
|
+
errors++;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
if (data.provider !== void 0) {
|
|
304
|
+
let data0 = data.provider;
|
|
305
|
+
if (typeof data0 === "string") {
|
|
306
|
+
if (!pattern0.test(data0)) {
|
|
307
|
+
const err4 = { instancePath: instancePath + "/provider", schemaPath: "#/definitions/akash-address/pattern", keyword: "pattern", params: { pattern: "^akash1[a-z0-9]{38}$" }, message: 'must match pattern "^akash1[a-z0-9]{38}$"' };
|
|
308
|
+
if (vErrors === null) {
|
|
309
|
+
vErrors = [err4];
|
|
310
|
+
} else {
|
|
311
|
+
vErrors.push(err4);
|
|
312
|
+
}
|
|
313
|
+
errors++;
|
|
314
|
+
}
|
|
315
|
+
} else {
|
|
316
|
+
const err5 = { instancePath: instancePath + "/provider", schemaPath: "#/definitions/akash-address/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
317
|
+
if (vErrors === null) {
|
|
318
|
+
vErrors = [err5];
|
|
319
|
+
} else {
|
|
320
|
+
vErrors.push(err5);
|
|
321
|
+
}
|
|
322
|
+
errors++;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
if (data.access !== void 0) {
|
|
326
|
+
if ("scoped" !== data.access) {
|
|
327
|
+
const err6 = { instancePath: instancePath + "/access", schemaPath: "#/properties/access/const", keyword: "const", params: { allowedValue: "scoped" }, message: "must be equal to constant" };
|
|
328
|
+
if (vErrors === null) {
|
|
329
|
+
vErrors = [err6];
|
|
330
|
+
} else {
|
|
331
|
+
vErrors.push(err6);
|
|
332
|
+
}
|
|
333
|
+
errors++;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
if (data.scope !== void 0) {
|
|
337
|
+
let data2 = data.scope;
|
|
338
|
+
if (Array.isArray(data2)) {
|
|
339
|
+
if (data2.length < 1) {
|
|
340
|
+
const err7 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
341
|
+
if (vErrors === null) {
|
|
342
|
+
vErrors = [err7];
|
|
343
|
+
} else {
|
|
344
|
+
vErrors.push(err7);
|
|
345
|
+
}
|
|
346
|
+
errors++;
|
|
347
|
+
}
|
|
348
|
+
const len0 = data2.length;
|
|
349
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
350
|
+
let data3 = data2[i0];
|
|
351
|
+
if (typeof data3 !== "string") {
|
|
352
|
+
const err8 = { instancePath: instancePath + "/scope/" + i0, schemaPath: "#/definitions/action-scope/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
353
|
+
if (vErrors === null) {
|
|
354
|
+
vErrors = [err8];
|
|
355
|
+
} else {
|
|
356
|
+
vErrors.push(err8);
|
|
357
|
+
}
|
|
358
|
+
errors++;
|
|
359
|
+
}
|
|
360
|
+
if (!(data3 === "send-manifest" || data3 === "get-manifest" || data3 === "logs" || data3 === "shell" || data3 === "events" || data3 === "status" || data3 === "restart" || data3 === "hostname-migrate" || data3 === "ip-migrate")) {
|
|
361
|
+
const err9 = { instancePath: instancePath + "/scope/" + i0, schemaPath: "#/definitions/action-scope/items/enum", keyword: "enum", params: { allowedValues: schema16.items.enum }, message: "must be equal to one of the allowed values" };
|
|
362
|
+
if (vErrors === null) {
|
|
363
|
+
vErrors = [err9];
|
|
364
|
+
} else {
|
|
365
|
+
vErrors.push(err9);
|
|
366
|
+
}
|
|
367
|
+
errors++;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
let i1 = data2.length;
|
|
371
|
+
let j0;
|
|
372
|
+
if (i1 > 1) {
|
|
373
|
+
const indices0 = {};
|
|
374
|
+
for (; i1--; ) {
|
|
375
|
+
let item0 = data2[i1];
|
|
376
|
+
if (typeof item0 !== "string") {
|
|
377
|
+
continue;
|
|
378
|
+
}
|
|
379
|
+
if (typeof indices0[item0] == "number") {
|
|
380
|
+
j0 = indices0[item0];
|
|
381
|
+
const err10 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" };
|
|
382
|
+
if (vErrors === null) {
|
|
383
|
+
vErrors = [err10];
|
|
384
|
+
} else {
|
|
385
|
+
vErrors.push(err10);
|
|
386
|
+
}
|
|
387
|
+
errors++;
|
|
388
|
+
break;
|
|
389
|
+
}
|
|
390
|
+
indices0[item0] = i1;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
} else {
|
|
394
|
+
const err11 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
395
|
+
if (vErrors === null) {
|
|
396
|
+
vErrors = [err11];
|
|
397
|
+
} else {
|
|
398
|
+
vErrors.push(err11);
|
|
399
|
+
}
|
|
400
|
+
errors++;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
} else {
|
|
404
|
+
const err12 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
405
|
+
if (vErrors === null) {
|
|
406
|
+
vErrors = [err12];
|
|
407
|
+
} else {
|
|
408
|
+
vErrors.push(err12);
|
|
409
|
+
}
|
|
410
|
+
errors++;
|
|
411
|
+
}
|
|
412
|
+
validate18.errors = vErrors;
|
|
413
|
+
return errors === 0;
|
|
414
|
+
}
|
|
415
|
+
function validate21(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
416
|
+
let vErrors = null;
|
|
417
|
+
let errors = 0;
|
|
418
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
419
|
+
if (data.dseq === void 0) {
|
|
420
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "dseq" }, message: "must have required property 'dseq'" };
|
|
421
|
+
if (vErrors === null) {
|
|
422
|
+
vErrors = [err0];
|
|
423
|
+
} else {
|
|
424
|
+
vErrors.push(err0);
|
|
425
|
+
}
|
|
426
|
+
errors++;
|
|
427
|
+
}
|
|
428
|
+
if (data.scope === void 0) {
|
|
429
|
+
const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "scope" }, message: "must have required property 'scope'" };
|
|
430
|
+
if (vErrors === null) {
|
|
431
|
+
vErrors = [err1];
|
|
432
|
+
} else {
|
|
433
|
+
vErrors.push(err1);
|
|
434
|
+
}
|
|
435
|
+
errors++;
|
|
436
|
+
}
|
|
437
|
+
if (data.services === void 0) {
|
|
438
|
+
const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "services" }, message: "must have required property 'services'" };
|
|
439
|
+
if (vErrors === null) {
|
|
440
|
+
vErrors = [err2];
|
|
441
|
+
} else {
|
|
442
|
+
vErrors.push(err2);
|
|
443
|
+
}
|
|
444
|
+
errors++;
|
|
445
|
+
}
|
|
446
|
+
for (const key0 in data) {
|
|
447
|
+
if (!(key0 === "dseq" || key0 === "scope" || key0 === "gseq" || key0 === "oseq" || key0 === "services")) {
|
|
448
|
+
const err3 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
449
|
+
if (vErrors === null) {
|
|
450
|
+
vErrors = [err3];
|
|
451
|
+
} else {
|
|
452
|
+
vErrors.push(err3);
|
|
453
|
+
}
|
|
454
|
+
errors++;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
if (data.oseq !== void 0) {
|
|
458
|
+
if (data.gseq === void 0) {
|
|
459
|
+
const err4 = { instancePath, schemaPath: "#/dependencies", keyword: "dependencies", params: {
|
|
460
|
+
property: "oseq",
|
|
461
|
+
missingProperty: "gseq",
|
|
462
|
+
depsCount: 1,
|
|
463
|
+
deps: "gseq"
|
|
464
|
+
}, message: "must have property gseq when property oseq is present" };
|
|
465
|
+
if (vErrors === null) {
|
|
466
|
+
vErrors = [err4];
|
|
467
|
+
} else {
|
|
468
|
+
vErrors.push(err4);
|
|
469
|
+
}
|
|
470
|
+
errors++;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
if (data.dseq !== void 0) {
|
|
474
|
+
let data0 = data.dseq;
|
|
475
|
+
if (!(typeof data0 == "number" && (!(data0 % 1) && !isNaN(data0)))) {
|
|
476
|
+
const err5 = { instancePath: instancePath + "/dseq", schemaPath: "#/properties/dseq/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
477
|
+
if (vErrors === null) {
|
|
478
|
+
vErrors = [err5];
|
|
479
|
+
} else {
|
|
480
|
+
vErrors.push(err5);
|
|
481
|
+
}
|
|
482
|
+
errors++;
|
|
483
|
+
}
|
|
484
|
+
if (typeof data0 == "number") {
|
|
485
|
+
if (data0 < 1 || isNaN(data0)) {
|
|
486
|
+
const err6 = { instancePath: instancePath + "/dseq", schemaPath: "#/properties/dseq/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
|
|
487
|
+
if (vErrors === null) {
|
|
488
|
+
vErrors = [err6];
|
|
489
|
+
} else {
|
|
490
|
+
vErrors.push(err6);
|
|
491
|
+
}
|
|
492
|
+
errors++;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
if (data.scope !== void 0) {
|
|
497
|
+
let data1 = data.scope;
|
|
498
|
+
if (Array.isArray(data1)) {
|
|
499
|
+
if (data1.length < 1) {
|
|
500
|
+
const err7 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
501
|
+
if (vErrors === null) {
|
|
502
|
+
vErrors = [err7];
|
|
503
|
+
} else {
|
|
504
|
+
vErrors.push(err7);
|
|
505
|
+
}
|
|
506
|
+
errors++;
|
|
507
|
+
}
|
|
508
|
+
const len0 = data1.length;
|
|
509
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
510
|
+
let data2 = data1[i0];
|
|
511
|
+
if (typeof data2 !== "string") {
|
|
512
|
+
const err8 = { instancePath: instancePath + "/scope/" + i0, schemaPath: "#/definitions/action-scope/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
513
|
+
if (vErrors === null) {
|
|
514
|
+
vErrors = [err8];
|
|
515
|
+
} else {
|
|
516
|
+
vErrors.push(err8);
|
|
517
|
+
}
|
|
518
|
+
errors++;
|
|
519
|
+
}
|
|
520
|
+
if (!(data2 === "send-manifest" || data2 === "get-manifest" || data2 === "logs" || data2 === "shell" || data2 === "events" || data2 === "status" || data2 === "restart" || data2 === "hostname-migrate" || data2 === "ip-migrate")) {
|
|
521
|
+
const err9 = { instancePath: instancePath + "/scope/" + i0, schemaPath: "#/definitions/action-scope/items/enum", keyword: "enum", params: { allowedValues: schema16.items.enum }, message: "must be equal to one of the allowed values" };
|
|
83
522
|
if (vErrors === null) {
|
|
84
|
-
vErrors = [
|
|
523
|
+
vErrors = [err9];
|
|
85
524
|
} else {
|
|
86
|
-
vErrors.push(
|
|
525
|
+
vErrors.push(err9);
|
|
87
526
|
}
|
|
88
527
|
errors++;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
let i1 = data1.length;
|
|
531
|
+
let j0;
|
|
532
|
+
if (i1 > 1) {
|
|
533
|
+
const indices0 = {};
|
|
534
|
+
for (; i1--; ) {
|
|
535
|
+
let item0 = data1[i1];
|
|
536
|
+
if (typeof item0 !== "string") {
|
|
537
|
+
continue;
|
|
538
|
+
}
|
|
539
|
+
if (typeof indices0[item0] == "number") {
|
|
540
|
+
j0 = indices0[item0];
|
|
541
|
+
const err10 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" };
|
|
542
|
+
if (vErrors === null) {
|
|
543
|
+
vErrors = [err10];
|
|
544
|
+
} else {
|
|
545
|
+
vErrors.push(err10);
|
|
546
|
+
}
|
|
547
|
+
errors++;
|
|
548
|
+
break;
|
|
549
|
+
}
|
|
550
|
+
indices0[item0] = i1;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
} else {
|
|
554
|
+
const err11 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
555
|
+
if (vErrors === null) {
|
|
556
|
+
vErrors = [err11];
|
|
557
|
+
} else {
|
|
558
|
+
vErrors.push(err11);
|
|
559
|
+
}
|
|
560
|
+
errors++;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
if (data.gseq !== void 0) {
|
|
564
|
+
let data3 = data.gseq;
|
|
565
|
+
if (!(typeof data3 == "number" && (!(data3 % 1) && !isNaN(data3)))) {
|
|
566
|
+
const err12 = { instancePath: instancePath + "/gseq", schemaPath: "#/properties/gseq/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
567
|
+
if (vErrors === null) {
|
|
568
|
+
vErrors = [err12];
|
|
569
|
+
} else {
|
|
570
|
+
vErrors.push(err12);
|
|
571
|
+
}
|
|
572
|
+
errors++;
|
|
573
|
+
}
|
|
574
|
+
if (typeof data3 == "number") {
|
|
575
|
+
if (data3 < 0 || isNaN(data3)) {
|
|
576
|
+
const err13 = { instancePath: instancePath + "/gseq", schemaPath: "#/properties/gseq/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
|
|
577
|
+
if (vErrors === null) {
|
|
578
|
+
vErrors = [err13];
|
|
89
579
|
} else {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
580
|
+
vErrors.push(err13);
|
|
581
|
+
}
|
|
582
|
+
errors++;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
if (data.oseq !== void 0) {
|
|
587
|
+
let data4 = data.oseq;
|
|
588
|
+
if (!(typeof data4 == "number" && (!(data4 % 1) && !isNaN(data4)))) {
|
|
589
|
+
const err14 = { instancePath: instancePath + "/oseq", schemaPath: "#/properties/oseq/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
590
|
+
if (vErrors === null) {
|
|
591
|
+
vErrors = [err14];
|
|
592
|
+
} else {
|
|
593
|
+
vErrors.push(err14);
|
|
594
|
+
}
|
|
595
|
+
errors++;
|
|
596
|
+
}
|
|
597
|
+
if (typeof data4 == "number") {
|
|
598
|
+
if (data4 < 0 || isNaN(data4)) {
|
|
599
|
+
const err15 = { instancePath: instancePath + "/oseq", schemaPath: "#/properties/oseq/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
|
|
600
|
+
if (vErrors === null) {
|
|
601
|
+
vErrors = [err15];
|
|
602
|
+
} else {
|
|
603
|
+
vErrors.push(err15);
|
|
604
|
+
}
|
|
605
|
+
errors++;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
if (data.services !== void 0) {
|
|
610
|
+
let data5 = data.services;
|
|
611
|
+
if (Array.isArray(data5)) {
|
|
612
|
+
if (data5.length < 1) {
|
|
613
|
+
const err16 = { instancePath: instancePath + "/services", schemaPath: "#/properties/services/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
614
|
+
if (vErrors === null) {
|
|
615
|
+
vErrors = [err16];
|
|
616
|
+
} else {
|
|
617
|
+
vErrors.push(err16);
|
|
618
|
+
}
|
|
619
|
+
errors++;
|
|
620
|
+
}
|
|
621
|
+
const len1 = data5.length;
|
|
622
|
+
for (let i2 = 0; i2 < len1; i2++) {
|
|
623
|
+
let data6 = data5[i2];
|
|
624
|
+
if (typeof data6 === "string") {
|
|
625
|
+
if (func2(data6) < 1) {
|
|
626
|
+
const err17 = { instancePath: instancePath + "/services/" + i2, schemaPath: "#/properties/services/items/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
627
|
+
if (vErrors === null) {
|
|
628
|
+
vErrors = [err17];
|
|
629
|
+
} else {
|
|
630
|
+
vErrors.push(err17);
|
|
631
|
+
}
|
|
632
|
+
errors++;
|
|
633
|
+
}
|
|
634
|
+
} else {
|
|
635
|
+
const err18 = { instancePath: instancePath + "/services/" + i2, schemaPath: "#/properties/services/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
636
|
+
if (vErrors === null) {
|
|
637
|
+
vErrors = [err18];
|
|
638
|
+
} else {
|
|
639
|
+
vErrors.push(err18);
|
|
640
|
+
}
|
|
641
|
+
errors++;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
let i3 = data5.length;
|
|
645
|
+
let j1;
|
|
646
|
+
if (i3 > 1) {
|
|
647
|
+
const indices1 = {};
|
|
648
|
+
for (; i3--; ) {
|
|
649
|
+
let item1 = data5[i3];
|
|
650
|
+
if (typeof item1 !== "string") {
|
|
651
|
+
continue;
|
|
652
|
+
}
|
|
653
|
+
if (typeof indices1[item1] == "number") {
|
|
654
|
+
j1 = indices1[item1];
|
|
655
|
+
const err19 = { instancePath: instancePath + "/services", schemaPath: "#/properties/services/uniqueItems", keyword: "uniqueItems", params: { i: i3, j: j1 }, message: "must NOT have duplicate items (items ## " + j1 + " and " + i3 + " are identical)" };
|
|
656
|
+
if (vErrors === null) {
|
|
657
|
+
vErrors = [err19];
|
|
658
|
+
} else {
|
|
659
|
+
vErrors.push(err19);
|
|
99
660
|
}
|
|
661
|
+
errors++;
|
|
662
|
+
break;
|
|
100
663
|
}
|
|
664
|
+
indices1[item1] = i3;
|
|
101
665
|
}
|
|
102
666
|
}
|
|
667
|
+
} else {
|
|
668
|
+
const err20 = { instancePath: instancePath + "/services", schemaPath: "#/properties/services/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
669
|
+
if (vErrors === null) {
|
|
670
|
+
vErrors = [err20];
|
|
671
|
+
} else {
|
|
672
|
+
vErrors.push(err20);
|
|
673
|
+
}
|
|
674
|
+
errors++;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
} else {
|
|
678
|
+
const err21 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
679
|
+
if (vErrors === null) {
|
|
680
|
+
vErrors = [err21];
|
|
681
|
+
} else {
|
|
682
|
+
vErrors.push(err21);
|
|
683
|
+
}
|
|
684
|
+
errors++;
|
|
685
|
+
}
|
|
686
|
+
validate21.errors = vErrors;
|
|
687
|
+
return errors === 0;
|
|
688
|
+
}
|
|
689
|
+
function validate20(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
690
|
+
let vErrors = null;
|
|
691
|
+
let errors = 0;
|
|
692
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
693
|
+
if (data.provider === void 0) {
|
|
694
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "provider" }, message: "must have required property 'provider'" };
|
|
695
|
+
if (vErrors === null) {
|
|
696
|
+
vErrors = [err0];
|
|
697
|
+
} else {
|
|
698
|
+
vErrors.push(err0);
|
|
699
|
+
}
|
|
700
|
+
errors++;
|
|
701
|
+
}
|
|
702
|
+
if (data.access === void 0) {
|
|
703
|
+
const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
|
|
704
|
+
if (vErrors === null) {
|
|
705
|
+
vErrors = [err1];
|
|
706
|
+
} else {
|
|
707
|
+
vErrors.push(err1);
|
|
708
|
+
}
|
|
709
|
+
errors++;
|
|
710
|
+
}
|
|
711
|
+
if (data.deployments === void 0) {
|
|
712
|
+
const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "deployments" }, message: "must have required property 'deployments'" };
|
|
713
|
+
if (vErrors === null) {
|
|
714
|
+
vErrors = [err2];
|
|
715
|
+
} else {
|
|
716
|
+
vErrors.push(err2);
|
|
717
|
+
}
|
|
718
|
+
errors++;
|
|
719
|
+
}
|
|
720
|
+
for (const key0 in data) {
|
|
721
|
+
if (!(key0 === "provider" || key0 === "access" || key0 === "deployments")) {
|
|
722
|
+
const err3 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
723
|
+
if (vErrors === null) {
|
|
724
|
+
vErrors = [err3];
|
|
725
|
+
} else {
|
|
726
|
+
vErrors.push(err3);
|
|
727
|
+
}
|
|
728
|
+
errors++;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
if (data.provider !== void 0) {
|
|
732
|
+
let data0 = data.provider;
|
|
733
|
+
if (typeof data0 === "string") {
|
|
734
|
+
if (!pattern0.test(data0)) {
|
|
735
|
+
const err4 = { instancePath: instancePath + "/provider", schemaPath: "#/definitions/akash-address/pattern", keyword: "pattern", params: { pattern: "^akash1[a-z0-9]{38}$" }, message: 'must match pattern "^akash1[a-z0-9]{38}$"' };
|
|
736
|
+
if (vErrors === null) {
|
|
737
|
+
vErrors = [err4];
|
|
738
|
+
} else {
|
|
739
|
+
vErrors.push(err4);
|
|
740
|
+
}
|
|
741
|
+
errors++;
|
|
742
|
+
}
|
|
743
|
+
} else {
|
|
744
|
+
const err5 = { instancePath: instancePath + "/provider", schemaPath: "#/definitions/akash-address/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
745
|
+
if (vErrors === null) {
|
|
746
|
+
vErrors = [err5];
|
|
747
|
+
} else {
|
|
748
|
+
vErrors.push(err5);
|
|
749
|
+
}
|
|
750
|
+
errors++;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
if (data.access !== void 0) {
|
|
754
|
+
if ("granular" !== data.access) {
|
|
755
|
+
const err6 = { instancePath: instancePath + "/access", schemaPath: "#/properties/access/const", keyword: "const", params: { allowedValue: "granular" }, message: "must be equal to constant" };
|
|
756
|
+
if (vErrors === null) {
|
|
757
|
+
vErrors = [err6];
|
|
758
|
+
} else {
|
|
759
|
+
vErrors.push(err6);
|
|
760
|
+
}
|
|
761
|
+
errors++;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
if (data.deployments !== void 0) {
|
|
765
|
+
let data2 = data.deployments;
|
|
766
|
+
if (Array.isArray(data2)) {
|
|
767
|
+
if (data2.length < 1) {
|
|
768
|
+
const err7 = { instancePath: instancePath + "/deployments", schemaPath: "#/properties/deployments/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
769
|
+
if (vErrors === null) {
|
|
770
|
+
vErrors = [err7];
|
|
771
|
+
} else {
|
|
772
|
+
vErrors.push(err7);
|
|
773
|
+
}
|
|
774
|
+
errors++;
|
|
775
|
+
}
|
|
776
|
+
const len0 = data2.length;
|
|
777
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
778
|
+
if (!validate21(data2[i0], { instancePath: instancePath + "/deployments/" + i0, parentData: data2, parentDataProperty: i0, rootData })) {
|
|
779
|
+
vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);
|
|
780
|
+
errors = vErrors.length;
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
} else {
|
|
784
|
+
const err8 = { instancePath: instancePath + "/deployments", schemaPath: "#/properties/deployments/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
785
|
+
if (vErrors === null) {
|
|
786
|
+
vErrors = [err8];
|
|
787
|
+
} else {
|
|
788
|
+
vErrors.push(err8);
|
|
789
|
+
}
|
|
790
|
+
errors++;
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
} else {
|
|
794
|
+
const err9 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
795
|
+
if (vErrors === null) {
|
|
796
|
+
vErrors = [err9];
|
|
797
|
+
} else {
|
|
798
|
+
vErrors.push(err9);
|
|
799
|
+
}
|
|
800
|
+
errors++;
|
|
801
|
+
}
|
|
802
|
+
validate20.errors = vErrors;
|
|
803
|
+
return errors === 0;
|
|
804
|
+
}
|
|
805
|
+
function validate15(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
806
|
+
let vErrors = null;
|
|
807
|
+
let errors = 0;
|
|
808
|
+
if (!(data && typeof data == "object" && !Array.isArray(data))) {
|
|
809
|
+
const err0 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
810
|
+
if (vErrors === null) {
|
|
811
|
+
vErrors = [err0];
|
|
812
|
+
} else {
|
|
813
|
+
vErrors.push(err0);
|
|
814
|
+
}
|
|
815
|
+
errors++;
|
|
816
|
+
}
|
|
817
|
+
const _errs1 = errors;
|
|
818
|
+
let valid0 = false;
|
|
819
|
+
let passing0 = null;
|
|
820
|
+
const _errs2 = errors;
|
|
821
|
+
if (!validate16(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
822
|
+
vErrors = vErrors === null ? validate16.errors : vErrors.concat(validate16.errors);
|
|
823
|
+
errors = vErrors.length;
|
|
824
|
+
}
|
|
825
|
+
var _valid0 = _errs2 === errors;
|
|
826
|
+
if (_valid0) {
|
|
827
|
+
valid0 = true;
|
|
828
|
+
passing0 = 0;
|
|
829
|
+
}
|
|
830
|
+
const _errs3 = errors;
|
|
831
|
+
if (!validate18(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
832
|
+
vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);
|
|
833
|
+
errors = vErrors.length;
|
|
834
|
+
}
|
|
835
|
+
var _valid0 = _errs3 === errors;
|
|
836
|
+
if (_valid0 && valid0) {
|
|
837
|
+
valid0 = false;
|
|
838
|
+
passing0 = [passing0, 1];
|
|
839
|
+
} else {
|
|
840
|
+
if (_valid0) {
|
|
841
|
+
valid0 = true;
|
|
842
|
+
passing0 = 1;
|
|
843
|
+
}
|
|
844
|
+
const _errs4 = errors;
|
|
845
|
+
if (!validate20(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
846
|
+
vErrors = vErrors === null ? validate20.errors : vErrors.concat(validate20.errors);
|
|
847
|
+
errors = vErrors.length;
|
|
848
|
+
}
|
|
849
|
+
var _valid0 = _errs4 === errors;
|
|
850
|
+
if (_valid0 && valid0) {
|
|
851
|
+
valid0 = false;
|
|
852
|
+
passing0 = [passing0, 2];
|
|
853
|
+
} else {
|
|
854
|
+
if (_valid0) {
|
|
855
|
+
valid0 = true;
|
|
856
|
+
passing0 = 2;
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
if (!valid0) {
|
|
861
|
+
const err1 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
|
|
862
|
+
if (vErrors === null) {
|
|
863
|
+
vErrors = [err1];
|
|
864
|
+
} else {
|
|
865
|
+
vErrors.push(err1);
|
|
866
|
+
}
|
|
867
|
+
errors++;
|
|
868
|
+
} else {
|
|
869
|
+
errors = _errs1;
|
|
870
|
+
if (vErrors !== null) {
|
|
871
|
+
if (_errs1) {
|
|
872
|
+
vErrors.length = _errs1;
|
|
873
|
+
} else {
|
|
874
|
+
vErrors = null;
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
validate15.errors = vErrors;
|
|
879
|
+
return errors === 0;
|
|
880
|
+
}
|
|
881
|
+
function validate14(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
882
|
+
let vErrors = null;
|
|
883
|
+
let errors = 0;
|
|
884
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
885
|
+
if (data.access === void 0) {
|
|
886
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
|
|
887
|
+
if (vErrors === null) {
|
|
888
|
+
vErrors = [err0];
|
|
889
|
+
} else {
|
|
890
|
+
vErrors.push(err0);
|
|
891
|
+
}
|
|
892
|
+
errors++;
|
|
893
|
+
}
|
|
894
|
+
if (data.permissions === void 0) {
|
|
895
|
+
const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "permissions" }, message: "must have required property 'permissions'" };
|
|
896
|
+
if (vErrors === null) {
|
|
897
|
+
vErrors = [err1];
|
|
898
|
+
} else {
|
|
899
|
+
vErrors.push(err1);
|
|
900
|
+
}
|
|
901
|
+
errors++;
|
|
902
|
+
}
|
|
903
|
+
for (const key0 in data) {
|
|
904
|
+
if (!(key0 === "access" || key0 === "permissions")) {
|
|
905
|
+
const err2 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
906
|
+
if (vErrors === null) {
|
|
907
|
+
vErrors = [err2];
|
|
908
|
+
} else {
|
|
909
|
+
vErrors.push(err2);
|
|
910
|
+
}
|
|
911
|
+
errors++;
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
if (data.access !== void 0) {
|
|
915
|
+
if ("granular" !== data.access) {
|
|
916
|
+
const err3 = { instancePath: instancePath + "/access", schemaPath: "#/properties/access/const", keyword: "const", params: { allowedValue: "granular" }, message: "must be equal to constant" };
|
|
917
|
+
if (vErrors === null) {
|
|
918
|
+
vErrors = [err3];
|
|
919
|
+
} else {
|
|
920
|
+
vErrors.push(err3);
|
|
921
|
+
}
|
|
922
|
+
errors++;
|
|
103
923
|
}
|
|
104
924
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
if (_valid0) {
|
|
116
|
-
const _errs6 = errors;
|
|
117
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
118
|
-
if (data.leases !== void 0) {
|
|
119
|
-
let data2 = data.leases;
|
|
120
|
-
if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
|
|
121
|
-
if (data2.permissions === void 0) {
|
|
122
|
-
const err3 = { instancePath: instancePath + "/leases", schemaPath: "#/allOf/0/then/properties/leases/required", keyword: "required", params: { missingProperty: "permissions" }, message: "must have required property 'permissions'" };
|
|
123
|
-
if (vErrors === null) {
|
|
124
|
-
vErrors = [err3];
|
|
125
|
-
} else {
|
|
126
|
-
vErrors.push(err3);
|
|
127
|
-
}
|
|
128
|
-
errors++;
|
|
925
|
+
if (data.permissions !== void 0) {
|
|
926
|
+
let data1 = data.permissions;
|
|
927
|
+
if (Array.isArray(data1)) {
|
|
928
|
+
if (data1.length < 1) {
|
|
929
|
+
const err4 = { instancePath: instancePath + "/permissions", schemaPath: "#/properties/permissions/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
930
|
+
if (vErrors === null) {
|
|
931
|
+
vErrors = [err4];
|
|
932
|
+
} else {
|
|
933
|
+
vErrors.push(err4);
|
|
129
934
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
errors++;
|
|
935
|
+
errors++;
|
|
936
|
+
}
|
|
937
|
+
const len0 = data1.length;
|
|
938
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
939
|
+
if (!validate15(data1[i0], { instancePath: instancePath + "/permissions/" + i0, parentData: data1, parentDataProperty: i0, rootData })) {
|
|
940
|
+
vErrors = vErrors === null ? validate15.errors : vErrors.concat(validate15.errors);
|
|
941
|
+
errors = vErrors.length;
|
|
138
942
|
}
|
|
139
943
|
}
|
|
944
|
+
} else {
|
|
945
|
+
const err5 = { instancePath: instancePath + "/permissions", schemaPath: "#/properties/permissions/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
946
|
+
if (vErrors === null) {
|
|
947
|
+
vErrors = [err5];
|
|
948
|
+
} else {
|
|
949
|
+
vErrors.push(err5);
|
|
950
|
+
}
|
|
951
|
+
errors++;
|
|
140
952
|
}
|
|
141
953
|
}
|
|
142
|
-
|
|
143
|
-
|
|
954
|
+
} else {
|
|
955
|
+
const err6 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
956
|
+
if (vErrors === null) {
|
|
957
|
+
vErrors = [err6];
|
|
958
|
+
} else {
|
|
959
|
+
vErrors.push(err6);
|
|
960
|
+
}
|
|
961
|
+
errors++;
|
|
144
962
|
}
|
|
145
|
-
|
|
146
|
-
|
|
963
|
+
validate14.errors = vErrors;
|
|
964
|
+
return errors === 0;
|
|
965
|
+
}
|
|
966
|
+
function validate11(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
967
|
+
let vErrors = null;
|
|
968
|
+
let errors = 0;
|
|
969
|
+
if (!(data && typeof data == "object" && !Array.isArray(data))) {
|
|
970
|
+
const err0 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
147
971
|
if (vErrors === null) {
|
|
148
|
-
vErrors = [
|
|
972
|
+
vErrors = [err0];
|
|
149
973
|
} else {
|
|
150
|
-
vErrors.push(
|
|
974
|
+
vErrors.push(err0);
|
|
151
975
|
}
|
|
152
976
|
errors++;
|
|
153
977
|
}
|
|
154
|
-
const
|
|
155
|
-
let
|
|
156
|
-
|
|
978
|
+
const _errs1 = errors;
|
|
979
|
+
let valid0 = false;
|
|
980
|
+
let passing0 = null;
|
|
981
|
+
const _errs2 = errors;
|
|
157
982
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
const err6 = {};
|
|
983
|
+
if (data.access === void 0) {
|
|
984
|
+
const err1 = { instancePath, schemaPath: "#/definitions/leases-full/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
|
|
161
985
|
if (vErrors === null) {
|
|
162
|
-
vErrors = [
|
|
986
|
+
vErrors = [err1];
|
|
163
987
|
} else {
|
|
164
|
-
vErrors.push(
|
|
988
|
+
vErrors.push(err1);
|
|
165
989
|
}
|
|
166
990
|
errors++;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
vErrors = [err7];
|
|
176
|
-
} else {
|
|
177
|
-
vErrors.push(err7);
|
|
178
|
-
}
|
|
179
|
-
errors++;
|
|
180
|
-
} else {
|
|
181
|
-
if (data4.permissions !== void 0) {
|
|
182
|
-
let data5 = data4.permissions;
|
|
183
|
-
const _errs12 = errors;
|
|
184
|
-
if (errors === _errs12) {
|
|
185
|
-
if (Array.isArray(data5)) {
|
|
186
|
-
if (data5.length < 1) {
|
|
187
|
-
const err8 = {};
|
|
188
|
-
if (vErrors === null) {
|
|
189
|
-
vErrors = [err8];
|
|
190
|
-
} else {
|
|
191
|
-
vErrors.push(err8);
|
|
192
|
-
}
|
|
193
|
-
errors++;
|
|
194
|
-
}
|
|
195
|
-
} else {
|
|
196
|
-
const err9 = {};
|
|
197
|
-
if (vErrors === null) {
|
|
198
|
-
vErrors = [err9];
|
|
199
|
-
} else {
|
|
200
|
-
vErrors.push(err9);
|
|
201
|
-
}
|
|
202
|
-
errors++;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
991
|
+
}
|
|
992
|
+
for (const key0 in data) {
|
|
993
|
+
if (!(key0 === "access")) {
|
|
994
|
+
const err2 = { instancePath, schemaPath: "#/definitions/leases-full/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
995
|
+
if (vErrors === null) {
|
|
996
|
+
vErrors = [err2];
|
|
997
|
+
} else {
|
|
998
|
+
vErrors.push(err2);
|
|
207
999
|
}
|
|
1000
|
+
errors++;
|
|
208
1001
|
}
|
|
209
1002
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
1003
|
+
if (data.access !== void 0) {
|
|
1004
|
+
if ("full" !== data.access) {
|
|
1005
|
+
const err3 = { instancePath: instancePath + "/access", schemaPath: "#/definitions/leases-full/properties/access/const", keyword: "const", params: { allowedValue: "full" }, message: "must be equal to constant" };
|
|
1006
|
+
if (vErrors === null) {
|
|
1007
|
+
vErrors = [err3];
|
|
1008
|
+
} else {
|
|
1009
|
+
vErrors.push(err3);
|
|
1010
|
+
}
|
|
1011
|
+
errors++;
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
} else {
|
|
1015
|
+
const err4 = { instancePath, schemaPath: "#/definitions/leases-full/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1016
|
+
if (vErrors === null) {
|
|
1017
|
+
vErrors = [err4];
|
|
216
1018
|
} else {
|
|
217
|
-
vErrors
|
|
1019
|
+
vErrors.push(err4);
|
|
218
1020
|
}
|
|
1021
|
+
errors++;
|
|
219
1022
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
1023
|
+
var _valid0 = _errs2 === errors;
|
|
1024
|
+
if (_valid0) {
|
|
1025
|
+
valid0 = true;
|
|
1026
|
+
passing0 = 0;
|
|
1027
|
+
}
|
|
1028
|
+
const _errs7 = errors;
|
|
1029
|
+
if (!validate12(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
1030
|
+
vErrors = vErrors === null ? validate12.errors : vErrors.concat(validate12.errors);
|
|
1031
|
+
errors = vErrors.length;
|
|
1032
|
+
}
|
|
1033
|
+
var _valid0 = _errs7 === errors;
|
|
1034
|
+
if (_valid0 && valid0) {
|
|
1035
|
+
valid0 = false;
|
|
1036
|
+
passing0 = [passing0, 1];
|
|
1037
|
+
} else {
|
|
1038
|
+
if (_valid0) {
|
|
1039
|
+
valid0 = true;
|
|
1040
|
+
passing0 = 1;
|
|
1041
|
+
}
|
|
1042
|
+
const _errs8 = errors;
|
|
1043
|
+
if (!validate14(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
1044
|
+
vErrors = vErrors === null ? validate14.errors : vErrors.concat(validate14.errors);
|
|
1045
|
+
errors = vErrors.length;
|
|
1046
|
+
}
|
|
1047
|
+
var _valid0 = _errs8 === errors;
|
|
1048
|
+
if (_valid0 && valid0) {
|
|
1049
|
+
valid0 = false;
|
|
1050
|
+
passing0 = [passing0, 2];
|
|
1051
|
+
} else {
|
|
1052
|
+
if (_valid0) {
|
|
1053
|
+
valid0 = true;
|
|
1054
|
+
passing0 = 2;
|
|
247
1055
|
}
|
|
248
1056
|
}
|
|
249
|
-
var _valid1 = _errs14 === errors;
|
|
250
|
-
valid6 = _valid1;
|
|
251
1057
|
}
|
|
252
|
-
if (!
|
|
253
|
-
const
|
|
1058
|
+
if (!valid0) {
|
|
1059
|
+
const err5 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
|
|
254
1060
|
if (vErrors === null) {
|
|
255
|
-
vErrors = [
|
|
1061
|
+
vErrors = [err5];
|
|
256
1062
|
} else {
|
|
257
|
-
vErrors.push(
|
|
1063
|
+
vErrors.push(err5);
|
|
258
1064
|
}
|
|
259
1065
|
errors++;
|
|
1066
|
+
} else {
|
|
1067
|
+
errors = _errs1;
|
|
1068
|
+
if (vErrors !== null) {
|
|
1069
|
+
if (_errs1) {
|
|
1070
|
+
vErrors.length = _errs1;
|
|
1071
|
+
} else {
|
|
1072
|
+
vErrors = null;
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
260
1075
|
}
|
|
1076
|
+
validate11.errors = vErrors;
|
|
1077
|
+
return errors === 0;
|
|
1078
|
+
}
|
|
1079
|
+
function validate10(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
1080
|
+
;
|
|
1081
|
+
let vErrors = null;
|
|
1082
|
+
let errors = 0;
|
|
261
1083
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
262
1084
|
if (data.iss === void 0) {
|
|
263
|
-
const
|
|
1085
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "iss" }, message: "must have required property 'iss'" };
|
|
264
1086
|
if (vErrors === null) {
|
|
265
|
-
vErrors = [
|
|
1087
|
+
vErrors = [err0];
|
|
266
1088
|
} else {
|
|
267
|
-
vErrors.push(
|
|
1089
|
+
vErrors.push(err0);
|
|
268
1090
|
}
|
|
269
1091
|
errors++;
|
|
270
1092
|
}
|
|
271
1093
|
if (data.iat === void 0) {
|
|
272
|
-
const
|
|
1094
|
+
const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "iat" }, message: "must have required property 'iat'" };
|
|
273
1095
|
if (vErrors === null) {
|
|
274
|
-
vErrors = [
|
|
1096
|
+
vErrors = [err1];
|
|
275
1097
|
} else {
|
|
276
|
-
vErrors.push(
|
|
1098
|
+
vErrors.push(err1);
|
|
277
1099
|
}
|
|
278
1100
|
errors++;
|
|
279
1101
|
}
|
|
280
1102
|
if (data.exp === void 0) {
|
|
281
|
-
const
|
|
1103
|
+
const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "exp" }, message: "must have required property 'exp'" };
|
|
282
1104
|
if (vErrors === null) {
|
|
283
|
-
vErrors = [
|
|
1105
|
+
vErrors = [err2];
|
|
284
1106
|
} else {
|
|
285
|
-
vErrors.push(
|
|
1107
|
+
vErrors.push(err2);
|
|
286
1108
|
}
|
|
287
1109
|
errors++;
|
|
288
1110
|
}
|
|
289
1111
|
if (data.nbf === void 0) {
|
|
290
|
-
const
|
|
1112
|
+
const err3 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "nbf" }, message: "must have required property 'nbf'" };
|
|
291
1113
|
if (vErrors === null) {
|
|
292
|
-
vErrors = [
|
|
1114
|
+
vErrors = [err3];
|
|
293
1115
|
} else {
|
|
294
|
-
vErrors.push(
|
|
1116
|
+
vErrors.push(err3);
|
|
295
1117
|
}
|
|
296
1118
|
errors++;
|
|
297
1119
|
}
|
|
298
1120
|
if (data.version === void 0) {
|
|
299
|
-
const
|
|
1121
|
+
const err4 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "version" }, message: "must have required property 'version'" };
|
|
300
1122
|
if (vErrors === null) {
|
|
301
|
-
vErrors = [
|
|
1123
|
+
vErrors = [err4];
|
|
302
1124
|
} else {
|
|
303
|
-
vErrors.push(
|
|
1125
|
+
vErrors.push(err4);
|
|
304
1126
|
}
|
|
305
1127
|
errors++;
|
|
306
1128
|
}
|
|
307
1129
|
if (data.leases === void 0) {
|
|
308
|
-
const
|
|
1130
|
+
const err5 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "leases" }, message: "must have required property 'leases'" };
|
|
309
1131
|
if (vErrors === null) {
|
|
310
|
-
vErrors = [
|
|
1132
|
+
vErrors = [err5];
|
|
311
1133
|
} else {
|
|
312
|
-
vErrors.push(
|
|
1134
|
+
vErrors.push(err5);
|
|
313
1135
|
}
|
|
314
1136
|
errors++;
|
|
315
1137
|
}
|
|
316
1138
|
for (const key0 in data) {
|
|
317
1139
|
if (!(key0 === "iss" || key0 === "iat" || key0 === "nbf" || key0 === "exp" || key0 === "jti" || key0 === "version" || key0 === "leases")) {
|
|
318
|
-
const
|
|
1140
|
+
const err6 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
319
1141
|
if (vErrors === null) {
|
|
320
|
-
vErrors = [
|
|
1142
|
+
vErrors = [err6];
|
|
321
1143
|
} else {
|
|
322
|
-
vErrors.push(
|
|
1144
|
+
vErrors.push(err6);
|
|
323
1145
|
}
|
|
324
1146
|
errors++;
|
|
325
1147
|
}
|
|
326
1148
|
}
|
|
327
1149
|
if (data.iss !== void 0) {
|
|
328
|
-
let
|
|
329
|
-
if (typeof
|
|
330
|
-
if (!pattern0.test(
|
|
331
|
-
const
|
|
1150
|
+
let data0 = data.iss;
|
|
1151
|
+
if (typeof data0 === "string") {
|
|
1152
|
+
if (!pattern0.test(data0)) {
|
|
1153
|
+
const err7 = { instancePath: instancePath + "/iss", schemaPath: "#/definitions/akash-address/pattern", keyword: "pattern", params: { pattern: "^akash1[a-z0-9]{38}$" }, message: 'must match pattern "^akash1[a-z0-9]{38}$"' };
|
|
332
1154
|
if (vErrors === null) {
|
|
333
|
-
vErrors = [
|
|
1155
|
+
vErrors = [err7];
|
|
334
1156
|
} else {
|
|
335
|
-
vErrors.push(
|
|
1157
|
+
vErrors.push(err7);
|
|
336
1158
|
}
|
|
337
1159
|
errors++;
|
|
338
1160
|
}
|
|
339
1161
|
} else {
|
|
340
|
-
const
|
|
1162
|
+
const err8 = { instancePath: instancePath + "/iss", schemaPath: "#/definitions/akash-address/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
341
1163
|
if (vErrors === null) {
|
|
342
|
-
vErrors = [
|
|
1164
|
+
vErrors = [err8];
|
|
343
1165
|
} else {
|
|
344
|
-
vErrors.push(
|
|
1166
|
+
vErrors.push(err8);
|
|
345
1167
|
}
|
|
346
1168
|
errors++;
|
|
347
1169
|
}
|
|
348
1170
|
}
|
|
349
1171
|
if (data.iat !== void 0) {
|
|
350
|
-
let
|
|
351
|
-
if (!(typeof
|
|
352
|
-
const
|
|
1172
|
+
let data1 = data.iat;
|
|
1173
|
+
if (!(typeof data1 == "number" && (!(data1 % 1) && !isNaN(data1)))) {
|
|
1174
|
+
const err9 = { instancePath: instancePath + "/iat", schemaPath: "#/properties/iat/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
353
1175
|
if (vErrors === null) {
|
|
354
|
-
vErrors = [
|
|
1176
|
+
vErrors = [err9];
|
|
355
1177
|
} else {
|
|
356
|
-
vErrors.push(
|
|
1178
|
+
vErrors.push(err9);
|
|
357
1179
|
}
|
|
358
1180
|
errors++;
|
|
359
1181
|
}
|
|
360
|
-
if (typeof
|
|
361
|
-
if (
|
|
362
|
-
const
|
|
1182
|
+
if (typeof data1 == "number") {
|
|
1183
|
+
if (data1 < 0 || isNaN(data1)) {
|
|
1184
|
+
const err10 = { instancePath: instancePath + "/iat", schemaPath: "#/properties/iat/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
|
|
363
1185
|
if (vErrors === null) {
|
|
364
|
-
vErrors = [
|
|
1186
|
+
vErrors = [err10];
|
|
365
1187
|
} else {
|
|
366
|
-
vErrors.push(
|
|
1188
|
+
vErrors.push(err10);
|
|
367
1189
|
}
|
|
368
1190
|
errors++;
|
|
369
1191
|
}
|
|
370
1192
|
}
|
|
371
1193
|
}
|
|
372
1194
|
if (data.nbf !== void 0) {
|
|
373
|
-
let
|
|
374
|
-
if (!(typeof
|
|
375
|
-
const
|
|
1195
|
+
let data2 = data.nbf;
|
|
1196
|
+
if (!(typeof data2 == "number" && (!(data2 % 1) && !isNaN(data2)))) {
|
|
1197
|
+
const err11 = { instancePath: instancePath + "/nbf", schemaPath: "#/properties/nbf/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
376
1198
|
if (vErrors === null) {
|
|
377
|
-
vErrors = [
|
|
1199
|
+
vErrors = [err11];
|
|
378
1200
|
} else {
|
|
379
|
-
vErrors.push(
|
|
1201
|
+
vErrors.push(err11);
|
|
380
1202
|
}
|
|
381
1203
|
errors++;
|
|
382
1204
|
}
|
|
383
|
-
if (typeof
|
|
384
|
-
if (
|
|
385
|
-
const
|
|
1205
|
+
if (typeof data2 == "number") {
|
|
1206
|
+
if (data2 < 0 || isNaN(data2)) {
|
|
1207
|
+
const err12 = { instancePath: instancePath + "/nbf", schemaPath: "#/properties/nbf/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
|
|
386
1208
|
if (vErrors === null) {
|
|
387
|
-
vErrors = [
|
|
1209
|
+
vErrors = [err12];
|
|
388
1210
|
} else {
|
|
389
|
-
vErrors.push(
|
|
1211
|
+
vErrors.push(err12);
|
|
390
1212
|
}
|
|
391
1213
|
errors++;
|
|
392
1214
|
}
|
|
393
1215
|
}
|
|
394
1216
|
}
|
|
395
1217
|
if (data.exp !== void 0) {
|
|
396
|
-
let
|
|
397
|
-
if (!(typeof
|
|
398
|
-
const
|
|
1218
|
+
let data3 = data.exp;
|
|
1219
|
+
if (!(typeof data3 == "number" && (!(data3 % 1) && !isNaN(data3)))) {
|
|
1220
|
+
const err13 = { instancePath: instancePath + "/exp", schemaPath: "#/properties/exp/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
399
1221
|
if (vErrors === null) {
|
|
400
|
-
vErrors = [
|
|
1222
|
+
vErrors = [err13];
|
|
401
1223
|
} else {
|
|
402
|
-
vErrors.push(
|
|
1224
|
+
vErrors.push(err13);
|
|
403
1225
|
}
|
|
404
1226
|
errors++;
|
|
405
1227
|
}
|
|
406
|
-
if (typeof
|
|
407
|
-
if (
|
|
408
|
-
const
|
|
1228
|
+
if (typeof data3 == "number") {
|
|
1229
|
+
if (data3 < 0 || isNaN(data3)) {
|
|
1230
|
+
const err14 = { instancePath: instancePath + "/exp", schemaPath: "#/properties/exp/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
|
|
409
1231
|
if (vErrors === null) {
|
|
410
|
-
vErrors = [
|
|
1232
|
+
vErrors = [err14];
|
|
411
1233
|
} else {
|
|
412
|
-
vErrors.push(
|
|
1234
|
+
vErrors.push(err14);
|
|
413
1235
|
}
|
|
414
1236
|
errors++;
|
|
415
1237
|
}
|
|
416
1238
|
}
|
|
417
1239
|
}
|
|
418
1240
|
if (data.jti !== void 0) {
|
|
419
|
-
let
|
|
420
|
-
if (typeof
|
|
421
|
-
if (func2(
|
|
422
|
-
const
|
|
1241
|
+
let data4 = data.jti;
|
|
1242
|
+
if (typeof data4 === "string") {
|
|
1243
|
+
if (func2(data4) < 1) {
|
|
1244
|
+
const err15 = { instancePath: instancePath + "/jti", schemaPath: "#/properties/jti/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
423
1245
|
if (vErrors === null) {
|
|
424
|
-
vErrors = [
|
|
1246
|
+
vErrors = [err15];
|
|
425
1247
|
} else {
|
|
426
|
-
vErrors.push(
|
|
1248
|
+
vErrors.push(err15);
|
|
427
1249
|
}
|
|
428
1250
|
errors++;
|
|
429
1251
|
}
|
|
430
1252
|
} else {
|
|
431
|
-
const
|
|
1253
|
+
const err16 = { instancePath: instancePath + "/jti", schemaPath: "#/properties/jti/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
432
1254
|
if (vErrors === null) {
|
|
433
|
-
vErrors = [
|
|
1255
|
+
vErrors = [err16];
|
|
434
1256
|
} else {
|
|
435
|
-
vErrors.push(
|
|
1257
|
+
vErrors.push(err16);
|
|
436
1258
|
}
|
|
437
1259
|
errors++;
|
|
438
1260
|
}
|
|
439
1261
|
}
|
|
440
1262
|
if (data.version !== void 0) {
|
|
441
|
-
let
|
|
442
|
-
if (typeof
|
|
443
|
-
const
|
|
1263
|
+
let data5 = data.version;
|
|
1264
|
+
if (typeof data5 !== "string") {
|
|
1265
|
+
const err17 = { instancePath: instancePath + "/version", schemaPath: "#/properties/version/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
444
1266
|
if (vErrors === null) {
|
|
445
|
-
vErrors = [
|
|
1267
|
+
vErrors = [err17];
|
|
446
1268
|
} else {
|
|
447
|
-
vErrors.push(
|
|
1269
|
+
vErrors.push(err17);
|
|
448
1270
|
}
|
|
449
1271
|
errors++;
|
|
450
1272
|
}
|
|
451
|
-
if (!(
|
|
452
|
-
const
|
|
1273
|
+
if (!(data5 === "v1")) {
|
|
1274
|
+
const err18 = { instancePath: instancePath + "/version", schemaPath: "#/properties/version/enum", keyword: "enum", params: { allowedValues: schema11.properties.version.enum }, message: "must be equal to one of the allowed values" };
|
|
453
1275
|
if (vErrors === null) {
|
|
454
|
-
vErrors = [
|
|
1276
|
+
vErrors = [err18];
|
|
455
1277
|
} else {
|
|
456
|
-
vErrors.push(
|
|
1278
|
+
vErrors.push(err18);
|
|
457
1279
|
}
|
|
458
1280
|
errors++;
|
|
459
1281
|
}
|
|
460
1282
|
}
|
|
461
1283
|
if (data.leases !== void 0) {
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
const _errs34 = errors;
|
|
466
|
-
if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
|
|
467
|
-
if (data14.access !== void 0) {
|
|
468
|
-
if ("full" !== data14.access) {
|
|
469
|
-
const err32 = {};
|
|
470
|
-
if (vErrors === null) {
|
|
471
|
-
vErrors = [err32];
|
|
472
|
-
} else {
|
|
473
|
-
vErrors.push(err32);
|
|
474
|
-
}
|
|
475
|
-
errors++;
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
var _valid2 = _errs34 === errors;
|
|
480
|
-
errors = _errs33;
|
|
481
|
-
if (vErrors !== null) {
|
|
482
|
-
if (_errs33) {
|
|
483
|
-
vErrors.length = _errs33;
|
|
484
|
-
} else {
|
|
485
|
-
vErrors = null;
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
if (_valid2) {
|
|
489
|
-
const _errs36 = errors;
|
|
490
|
-
if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
|
|
491
|
-
if (data14.permissions !== void 0) {
|
|
492
|
-
const err33 = { instancePath: instancePath + "/leases/permissions", schemaPath: "#/properties/leases/allOf/0/then/properties/permissions/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
|
|
493
|
-
if (vErrors === null) {
|
|
494
|
-
vErrors = [err33];
|
|
495
|
-
} else {
|
|
496
|
-
vErrors.push(err33);
|
|
497
|
-
}
|
|
498
|
-
errors++;
|
|
499
|
-
}
|
|
500
|
-
if (data14.scope !== void 0) {
|
|
501
|
-
const err34 = { instancePath: instancePath + "/leases/scope", schemaPath: "#/properties/leases/allOf/0/then/properties/scope/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
|
|
502
|
-
if (vErrors === null) {
|
|
503
|
-
vErrors = [err34];
|
|
504
|
-
} else {
|
|
505
|
-
vErrors.push(err34);
|
|
506
|
-
}
|
|
507
|
-
errors++;
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
var _valid2 = _errs36 === errors;
|
|
511
|
-
valid13 = _valid2;
|
|
512
|
-
}
|
|
513
|
-
if (!valid13) {
|
|
514
|
-
const err35 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/allOf/0/if", keyword: "if", params: { failingKeyword: "then" }, message: 'must match "then" schema' };
|
|
515
|
-
if (vErrors === null) {
|
|
516
|
-
vErrors = [err35];
|
|
517
|
-
} else {
|
|
518
|
-
vErrors.push(err35);
|
|
519
|
-
}
|
|
520
|
-
errors++;
|
|
521
|
-
}
|
|
522
|
-
const _errs38 = errors;
|
|
523
|
-
let valid16 = true;
|
|
524
|
-
const _errs39 = errors;
|
|
525
|
-
if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
|
|
526
|
-
if (data14.access !== void 0) {
|
|
527
|
-
if ("scoped" !== data14.access) {
|
|
528
|
-
const err36 = {};
|
|
529
|
-
if (vErrors === null) {
|
|
530
|
-
vErrors = [err36];
|
|
531
|
-
} else {
|
|
532
|
-
vErrors.push(err36);
|
|
533
|
-
}
|
|
534
|
-
errors++;
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
var _valid3 = _errs39 === errors;
|
|
539
|
-
errors = _errs38;
|
|
540
|
-
if (vErrors !== null) {
|
|
541
|
-
if (_errs38) {
|
|
542
|
-
vErrors.length = _errs38;
|
|
543
|
-
} else {
|
|
544
|
-
vErrors = null;
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
if (_valid3) {
|
|
548
|
-
const _errs41 = errors;
|
|
549
|
-
if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
|
|
550
|
-
if (data14.scope === void 0) {
|
|
551
|
-
const err37 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/allOf/1/then/required", keyword: "required", params: { missingProperty: "scope" }, message: "must have required property 'scope'" };
|
|
552
|
-
if (vErrors === null) {
|
|
553
|
-
vErrors = [err37];
|
|
554
|
-
} else {
|
|
555
|
-
vErrors.push(err37);
|
|
556
|
-
}
|
|
557
|
-
errors++;
|
|
558
|
-
}
|
|
559
|
-
if (data14.scope !== void 0) {
|
|
560
|
-
let data19 = data14.scope;
|
|
561
|
-
if (Array.isArray(data19)) {
|
|
562
|
-
if (data19.length < 1) {
|
|
563
|
-
const err38 = { instancePath: instancePath + "/leases/scope", schemaPath: "#/properties/leases/allOf/1/then/properties/scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
564
|
-
if (vErrors === null) {
|
|
565
|
-
vErrors = [err38];
|
|
566
|
-
} else {
|
|
567
|
-
vErrors.push(err38);
|
|
568
|
-
}
|
|
569
|
-
errors++;
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
if (data14.permissions !== void 0) {
|
|
574
|
-
const err39 = { instancePath: instancePath + "/leases/permissions", schemaPath: "#/properties/leases/allOf/1/then/properties/permissions/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
|
|
575
|
-
if (vErrors === null) {
|
|
576
|
-
vErrors = [err39];
|
|
577
|
-
} else {
|
|
578
|
-
vErrors.push(err39);
|
|
579
|
-
}
|
|
580
|
-
errors++;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
var _valid3 = _errs41 === errors;
|
|
584
|
-
valid16 = _valid3;
|
|
585
|
-
}
|
|
586
|
-
if (!valid16) {
|
|
587
|
-
const err40 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/allOf/1/if", keyword: "if", params: { failingKeyword: "then" }, message: 'must match "then" schema' };
|
|
588
|
-
if (vErrors === null) {
|
|
589
|
-
vErrors = [err40];
|
|
590
|
-
} else {
|
|
591
|
-
vErrors.push(err40);
|
|
592
|
-
}
|
|
593
|
-
errors++;
|
|
594
|
-
}
|
|
595
|
-
const _errs44 = errors;
|
|
596
|
-
let valid19 = true;
|
|
597
|
-
const _errs45 = errors;
|
|
598
|
-
if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
|
|
599
|
-
let missing4;
|
|
600
|
-
if (data14.access === void 0 && (missing4 = "access")) {
|
|
601
|
-
const err41 = {};
|
|
602
|
-
if (vErrors === null) {
|
|
603
|
-
vErrors = [err41];
|
|
604
|
-
} else {
|
|
605
|
-
vErrors.push(err41);
|
|
606
|
-
}
|
|
607
|
-
errors++;
|
|
608
|
-
} else {
|
|
609
|
-
if (data14.access !== void 0) {
|
|
610
|
-
if ("granular" !== data14.access) {
|
|
611
|
-
const err42 = {};
|
|
612
|
-
if (vErrors === null) {
|
|
613
|
-
vErrors = [err42];
|
|
614
|
-
} else {
|
|
615
|
-
vErrors.push(err42);
|
|
616
|
-
}
|
|
617
|
-
errors++;
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
var _valid4 = _errs45 === errors;
|
|
623
|
-
errors = _errs44;
|
|
624
|
-
if (vErrors !== null) {
|
|
625
|
-
if (_errs44) {
|
|
626
|
-
vErrors.length = _errs44;
|
|
627
|
-
} else {
|
|
628
|
-
vErrors = null;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
if (_valid4) {
|
|
632
|
-
const _errs47 = errors;
|
|
633
|
-
if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
|
|
634
|
-
if (data14.permissions === void 0) {
|
|
635
|
-
const err43 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/allOf/2/then/required", keyword: "required", params: { missingProperty: "permissions" }, message: "must have required property 'permissions'" };
|
|
636
|
-
if (vErrors === null) {
|
|
637
|
-
vErrors = [err43];
|
|
638
|
-
} else {
|
|
639
|
-
vErrors.push(err43);
|
|
640
|
-
}
|
|
641
|
-
errors++;
|
|
642
|
-
}
|
|
643
|
-
if (data14.scope !== void 0) {
|
|
644
|
-
const err44 = { instancePath: instancePath + "/leases/scope", schemaPath: "#/properties/leases/allOf/2/then/properties/scope/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
|
|
645
|
-
if (vErrors === null) {
|
|
646
|
-
vErrors = [err44];
|
|
647
|
-
} else {
|
|
648
|
-
vErrors.push(err44);
|
|
649
|
-
}
|
|
650
|
-
errors++;
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
var _valid4 = _errs47 === errors;
|
|
654
|
-
valid19 = _valid4;
|
|
655
|
-
}
|
|
656
|
-
if (!valid19) {
|
|
657
|
-
const err45 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/allOf/2/if", keyword: "if", params: { failingKeyword: "then" }, message: 'must match "then" schema' };
|
|
658
|
-
if (vErrors === null) {
|
|
659
|
-
vErrors = [err45];
|
|
660
|
-
} else {
|
|
661
|
-
vErrors.push(err45);
|
|
662
|
-
}
|
|
663
|
-
errors++;
|
|
664
|
-
}
|
|
665
|
-
if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
|
|
666
|
-
if (data14.access === void 0) {
|
|
667
|
-
const err46 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
|
|
668
|
-
if (vErrors === null) {
|
|
669
|
-
vErrors = [err46];
|
|
670
|
-
} else {
|
|
671
|
-
vErrors.push(err46);
|
|
672
|
-
}
|
|
673
|
-
errors++;
|
|
674
|
-
}
|
|
675
|
-
for (const key1 in data14) {
|
|
676
|
-
if (!(key1 === "access" || key1 === "scope" || key1 === "permissions")) {
|
|
677
|
-
const err47 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
678
|
-
if (vErrors === null) {
|
|
679
|
-
vErrors = [err47];
|
|
680
|
-
} else {
|
|
681
|
-
vErrors.push(err47);
|
|
682
|
-
}
|
|
683
|
-
errors++;
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
if (data14.access !== void 0) {
|
|
687
|
-
let data23 = data14.access;
|
|
688
|
-
if (typeof data23 !== "string") {
|
|
689
|
-
const err48 = { instancePath: instancePath + "/leases/access", schemaPath: "#/properties/leases/properties/access/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
690
|
-
if (vErrors === null) {
|
|
691
|
-
vErrors = [err48];
|
|
692
|
-
} else {
|
|
693
|
-
vErrors.push(err48);
|
|
694
|
-
}
|
|
695
|
-
errors++;
|
|
696
|
-
}
|
|
697
|
-
if (!(data23 === "full" || data23 === "granular" || data23 === "scoped")) {
|
|
698
|
-
const err49 = { instancePath: instancePath + "/leases/access", schemaPath: "#/properties/leases/properties/access/enum", keyword: "enum", params: { allowedValues: schema11.properties.leases.properties.access.enum }, message: "must be equal to one of the allowed values" };
|
|
699
|
-
if (vErrors === null) {
|
|
700
|
-
vErrors = [err49];
|
|
701
|
-
} else {
|
|
702
|
-
vErrors.push(err49);
|
|
703
|
-
}
|
|
704
|
-
errors++;
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
if (data14.scope !== void 0) {
|
|
708
|
-
let data24 = data14.scope;
|
|
709
|
-
if (Array.isArray(data24)) {
|
|
710
|
-
if (data24.length < 1) {
|
|
711
|
-
const err50 = { instancePath: instancePath + "/leases/scope", schemaPath: "#/properties/leases/properties/scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
712
|
-
if (vErrors === null) {
|
|
713
|
-
vErrors = [err50];
|
|
714
|
-
} else {
|
|
715
|
-
vErrors.push(err50);
|
|
716
|
-
}
|
|
717
|
-
errors++;
|
|
718
|
-
}
|
|
719
|
-
const len0 = data24.length;
|
|
720
|
-
for (let i0 = 0; i0 < len0; i0++) {
|
|
721
|
-
let data25 = data24[i0];
|
|
722
|
-
if (typeof data25 !== "string") {
|
|
723
|
-
const err51 = { instancePath: instancePath + "/leases/scope/" + i0, schemaPath: "#/properties/leases/properties/scope/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
724
|
-
if (vErrors === null) {
|
|
725
|
-
vErrors = [err51];
|
|
726
|
-
} else {
|
|
727
|
-
vErrors.push(err51);
|
|
728
|
-
}
|
|
729
|
-
errors++;
|
|
730
|
-
}
|
|
731
|
-
if (!(data25 === "send-manifest" || data25 === "get-manifest" || data25 === "logs" || data25 === "shell" || data25 === "events" || data25 === "status" || data25 === "restart" || data25 === "hostname-migrate" || data25 === "ip-migrate")) {
|
|
732
|
-
const err52 = { instancePath: instancePath + "/leases/scope/" + i0, schemaPath: "#/properties/leases/properties/scope/items/enum", keyword: "enum", params: { allowedValues: schema11.properties.leases.properties.scope.items.enum }, message: "must be equal to one of the allowed values" };
|
|
733
|
-
if (vErrors === null) {
|
|
734
|
-
vErrors = [err52];
|
|
735
|
-
} else {
|
|
736
|
-
vErrors.push(err52);
|
|
737
|
-
}
|
|
738
|
-
errors++;
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
let i1 = data24.length;
|
|
742
|
-
let j0;
|
|
743
|
-
if (i1 > 1) {
|
|
744
|
-
const indices0 = {};
|
|
745
|
-
for (; i1--; ) {
|
|
746
|
-
let item0 = data24[i1];
|
|
747
|
-
if (typeof item0 !== "string") {
|
|
748
|
-
continue;
|
|
749
|
-
}
|
|
750
|
-
if (typeof indices0[item0] == "number") {
|
|
751
|
-
j0 = indices0[item0];
|
|
752
|
-
const err53 = { instancePath: instancePath + "/leases/scope", schemaPath: "#/properties/leases/properties/scope/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" };
|
|
753
|
-
if (vErrors === null) {
|
|
754
|
-
vErrors = [err53];
|
|
755
|
-
} else {
|
|
756
|
-
vErrors.push(err53);
|
|
757
|
-
}
|
|
758
|
-
errors++;
|
|
759
|
-
break;
|
|
760
|
-
}
|
|
761
|
-
indices0[item0] = i1;
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
} else {
|
|
765
|
-
const err54 = { instancePath: instancePath + "/leases/scope", schemaPath: "#/properties/leases/properties/scope/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
766
|
-
if (vErrors === null) {
|
|
767
|
-
vErrors = [err54];
|
|
768
|
-
} else {
|
|
769
|
-
vErrors.push(err54);
|
|
770
|
-
}
|
|
771
|
-
errors++;
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
if (data14.permissions !== void 0) {
|
|
775
|
-
let data26 = data14.permissions;
|
|
776
|
-
if (Array.isArray(data26)) {
|
|
777
|
-
if (data26.length < 1) {
|
|
778
|
-
const err55 = { instancePath: instancePath + "/leases/permissions", schemaPath: "#/properties/leases/properties/permissions/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
779
|
-
if (vErrors === null) {
|
|
780
|
-
vErrors = [err55];
|
|
781
|
-
} else {
|
|
782
|
-
vErrors.push(err55);
|
|
783
|
-
}
|
|
784
|
-
errors++;
|
|
785
|
-
}
|
|
786
|
-
const len1 = data26.length;
|
|
787
|
-
for (let i2 = 0; i2 < len1; i2++) {
|
|
788
|
-
let data27 = data26[i2];
|
|
789
|
-
const _errs60 = errors;
|
|
790
|
-
let valid29 = true;
|
|
791
|
-
const _errs61 = errors;
|
|
792
|
-
if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
|
|
793
|
-
if (data27.access !== void 0) {
|
|
794
|
-
if ("scoped" !== data27.access) {
|
|
795
|
-
const err56 = {};
|
|
796
|
-
if (vErrors === null) {
|
|
797
|
-
vErrors = [err56];
|
|
798
|
-
} else {
|
|
799
|
-
vErrors.push(err56);
|
|
800
|
-
}
|
|
801
|
-
errors++;
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
var _valid5 = _errs61 === errors;
|
|
806
|
-
errors = _errs60;
|
|
807
|
-
if (vErrors !== null) {
|
|
808
|
-
if (_errs60) {
|
|
809
|
-
vErrors.length = _errs60;
|
|
810
|
-
} else {
|
|
811
|
-
vErrors = null;
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
if (_valid5) {
|
|
815
|
-
const _errs63 = errors;
|
|
816
|
-
if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
|
|
817
|
-
if (data27.scope === void 0) {
|
|
818
|
-
const err57 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/allOf/0/then/required", keyword: "required", params: { missingProperty: "scope" }, message: "must have required property 'scope'" };
|
|
819
|
-
if (vErrors === null) {
|
|
820
|
-
vErrors = [err57];
|
|
821
|
-
} else {
|
|
822
|
-
vErrors.push(err57);
|
|
823
|
-
}
|
|
824
|
-
errors++;
|
|
825
|
-
}
|
|
826
|
-
if (data27.scope !== void 0) {
|
|
827
|
-
let data29 = data27.scope;
|
|
828
|
-
if (Array.isArray(data29)) {
|
|
829
|
-
if (data29.length < 1) {
|
|
830
|
-
const err58 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/allOf/0/then/properties/scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
831
|
-
if (vErrors === null) {
|
|
832
|
-
vErrors = [err58];
|
|
833
|
-
} else {
|
|
834
|
-
vErrors.push(err58);
|
|
835
|
-
}
|
|
836
|
-
errors++;
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
if (data27.deployments !== void 0) {
|
|
841
|
-
const err59 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments", schemaPath: "#/properties/leases/properties/permissions/items/allOf/0/then/properties/deployments/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
|
|
842
|
-
if (vErrors === null) {
|
|
843
|
-
vErrors = [err59];
|
|
844
|
-
} else {
|
|
845
|
-
vErrors.push(err59);
|
|
846
|
-
}
|
|
847
|
-
errors++;
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
var _valid5 = _errs63 === errors;
|
|
851
|
-
valid29 = _valid5;
|
|
852
|
-
}
|
|
853
|
-
if (!valid29) {
|
|
854
|
-
const err60 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/allOf/0/if", keyword: "if", params: { failingKeyword: "then" }, message: 'must match "then" schema' };
|
|
855
|
-
if (vErrors === null) {
|
|
856
|
-
vErrors = [err60];
|
|
857
|
-
} else {
|
|
858
|
-
vErrors.push(err60);
|
|
859
|
-
}
|
|
860
|
-
errors++;
|
|
861
|
-
}
|
|
862
|
-
const _errs66 = errors;
|
|
863
|
-
let valid32 = true;
|
|
864
|
-
const _errs67 = errors;
|
|
865
|
-
if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
|
|
866
|
-
if (data27.access !== void 0) {
|
|
867
|
-
if ("granular" !== data27.access) {
|
|
868
|
-
const err61 = {};
|
|
869
|
-
if (vErrors === null) {
|
|
870
|
-
vErrors = [err61];
|
|
871
|
-
} else {
|
|
872
|
-
vErrors.push(err61);
|
|
873
|
-
}
|
|
874
|
-
errors++;
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
}
|
|
878
|
-
var _valid6 = _errs67 === errors;
|
|
879
|
-
errors = _errs66;
|
|
880
|
-
if (vErrors !== null) {
|
|
881
|
-
if (_errs66) {
|
|
882
|
-
vErrors.length = _errs66;
|
|
883
|
-
} else {
|
|
884
|
-
vErrors = null;
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
if (_valid6) {
|
|
888
|
-
const _errs69 = errors;
|
|
889
|
-
if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
|
|
890
|
-
if (data27.deployments === void 0) {
|
|
891
|
-
const err62 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/allOf/1/then/required", keyword: "required", params: { missingProperty: "deployments" }, message: "must have required property 'deployments'" };
|
|
892
|
-
if (vErrors === null) {
|
|
893
|
-
vErrors = [err62];
|
|
894
|
-
} else {
|
|
895
|
-
vErrors.push(err62);
|
|
896
|
-
}
|
|
897
|
-
errors++;
|
|
898
|
-
}
|
|
899
|
-
if (data27.scope !== void 0) {
|
|
900
|
-
const err63 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/allOf/1/then/properties/scope/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
|
|
901
|
-
if (vErrors === null) {
|
|
902
|
-
vErrors = [err63];
|
|
903
|
-
} else {
|
|
904
|
-
vErrors.push(err63);
|
|
905
|
-
}
|
|
906
|
-
errors++;
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
var _valid6 = _errs69 === errors;
|
|
910
|
-
valid32 = _valid6;
|
|
911
|
-
}
|
|
912
|
-
if (!valid32) {
|
|
913
|
-
const err64 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/allOf/1/if", keyword: "if", params: { failingKeyword: "then" }, message: 'must match "then" schema' };
|
|
914
|
-
if (vErrors === null) {
|
|
915
|
-
vErrors = [err64];
|
|
916
|
-
} else {
|
|
917
|
-
vErrors.push(err64);
|
|
918
|
-
}
|
|
919
|
-
errors++;
|
|
920
|
-
}
|
|
921
|
-
const _errs71 = errors;
|
|
922
|
-
let valid35 = true;
|
|
923
|
-
const _errs72 = errors;
|
|
924
|
-
if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
|
|
925
|
-
if (data27.access !== void 0) {
|
|
926
|
-
if ("full" !== data27.access) {
|
|
927
|
-
const err65 = {};
|
|
928
|
-
if (vErrors === null) {
|
|
929
|
-
vErrors = [err65];
|
|
930
|
-
} else {
|
|
931
|
-
vErrors.push(err65);
|
|
932
|
-
}
|
|
933
|
-
errors++;
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
var _valid7 = _errs72 === errors;
|
|
938
|
-
errors = _errs71;
|
|
939
|
-
if (vErrors !== null) {
|
|
940
|
-
if (_errs71) {
|
|
941
|
-
vErrors.length = _errs71;
|
|
942
|
-
} else {
|
|
943
|
-
vErrors = null;
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
if (_valid7) {
|
|
947
|
-
const _errs74 = errors;
|
|
948
|
-
if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
|
|
949
|
-
if (data27.scope !== void 0) {
|
|
950
|
-
const err66 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/allOf/2/then/properties/scope/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
|
|
951
|
-
if (vErrors === null) {
|
|
952
|
-
vErrors = [err66];
|
|
953
|
-
} else {
|
|
954
|
-
vErrors.push(err66);
|
|
955
|
-
}
|
|
956
|
-
errors++;
|
|
957
|
-
}
|
|
958
|
-
if (data27.deployments !== void 0) {
|
|
959
|
-
const err67 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments", schemaPath: "#/properties/leases/properties/permissions/items/allOf/2/then/properties/deployments/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
|
|
960
|
-
if (vErrors === null) {
|
|
961
|
-
vErrors = [err67];
|
|
962
|
-
} else {
|
|
963
|
-
vErrors.push(err67);
|
|
964
|
-
}
|
|
965
|
-
errors++;
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
var _valid7 = _errs74 === errors;
|
|
969
|
-
valid35 = _valid7;
|
|
970
|
-
}
|
|
971
|
-
if (!valid35) {
|
|
972
|
-
const err68 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/allOf/2/if", keyword: "if", params: { failingKeyword: "then" }, message: 'must match "then" schema' };
|
|
973
|
-
if (vErrors === null) {
|
|
974
|
-
vErrors = [err68];
|
|
975
|
-
} else {
|
|
976
|
-
vErrors.push(err68);
|
|
977
|
-
}
|
|
978
|
-
errors++;
|
|
979
|
-
}
|
|
980
|
-
if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
|
|
981
|
-
if (data27.provider === void 0) {
|
|
982
|
-
const err69 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/required", keyword: "required", params: { missingProperty: "provider" }, message: "must have required property 'provider'" };
|
|
983
|
-
if (vErrors === null) {
|
|
984
|
-
vErrors = [err69];
|
|
985
|
-
} else {
|
|
986
|
-
vErrors.push(err69);
|
|
987
|
-
}
|
|
988
|
-
errors++;
|
|
989
|
-
}
|
|
990
|
-
if (data27.access === void 0) {
|
|
991
|
-
const err70 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
|
|
992
|
-
if (vErrors === null) {
|
|
993
|
-
vErrors = [err70];
|
|
994
|
-
} else {
|
|
995
|
-
vErrors.push(err70);
|
|
996
|
-
}
|
|
997
|
-
errors++;
|
|
998
|
-
}
|
|
999
|
-
for (const key2 in data27) {
|
|
1000
|
-
if (!(key2 === "provider" || key2 === "access" || key2 === "scope" || key2 === "deployments")) {
|
|
1001
|
-
const err71 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
|
|
1002
|
-
if (vErrors === null) {
|
|
1003
|
-
vErrors = [err71];
|
|
1004
|
-
} else {
|
|
1005
|
-
vErrors.push(err71);
|
|
1006
|
-
}
|
|
1007
|
-
errors++;
|
|
1008
|
-
}
|
|
1009
|
-
}
|
|
1010
|
-
if (data27.provider !== void 0) {
|
|
1011
|
-
let data36 = data27.provider;
|
|
1012
|
-
if (typeof data36 === "string") {
|
|
1013
|
-
if (!pattern0.test(data36)) {
|
|
1014
|
-
const err72 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/provider", schemaPath: "#/properties/leases/properties/permissions/items/properties/provider/pattern", keyword: "pattern", params: { pattern: "^akash1[a-z0-9]{38}$" }, message: 'must match pattern "^akash1[a-z0-9]{38}$"' };
|
|
1015
|
-
if (vErrors === null) {
|
|
1016
|
-
vErrors = [err72];
|
|
1017
|
-
} else {
|
|
1018
|
-
vErrors.push(err72);
|
|
1019
|
-
}
|
|
1020
|
-
errors++;
|
|
1021
|
-
}
|
|
1022
|
-
} else {
|
|
1023
|
-
const err73 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/provider", schemaPath: "#/properties/leases/properties/permissions/items/properties/provider/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1024
|
-
if (vErrors === null) {
|
|
1025
|
-
vErrors = [err73];
|
|
1026
|
-
} else {
|
|
1027
|
-
vErrors.push(err73);
|
|
1028
|
-
}
|
|
1029
|
-
errors++;
|
|
1030
|
-
}
|
|
1031
|
-
}
|
|
1032
|
-
if (data27.access !== void 0) {
|
|
1033
|
-
let data37 = data27.access;
|
|
1034
|
-
if (typeof data37 !== "string") {
|
|
1035
|
-
const err74 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/access", schemaPath: "#/properties/leases/properties/permissions/items/properties/access/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1036
|
-
if (vErrors === null) {
|
|
1037
|
-
vErrors = [err74];
|
|
1038
|
-
} else {
|
|
1039
|
-
vErrors.push(err74);
|
|
1040
|
-
}
|
|
1041
|
-
errors++;
|
|
1042
|
-
}
|
|
1043
|
-
if (!(data37 === "full" || data37 === "scoped" || data37 === "granular")) {
|
|
1044
|
-
const err75 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/access", schemaPath: "#/properties/leases/properties/permissions/items/properties/access/enum", keyword: "enum", params: { allowedValues: schema11.properties.leases.properties.permissions.items.properties.access.enum }, message: "must be equal to one of the allowed values" };
|
|
1045
|
-
if (vErrors === null) {
|
|
1046
|
-
vErrors = [err75];
|
|
1047
|
-
} else {
|
|
1048
|
-
vErrors.push(err75);
|
|
1049
|
-
}
|
|
1050
|
-
errors++;
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
if (data27.scope !== void 0) {
|
|
1054
|
-
let data38 = data27.scope;
|
|
1055
|
-
if (Array.isArray(data38)) {
|
|
1056
|
-
if (data38.length < 1) {
|
|
1057
|
-
const err76 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/properties/scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
1058
|
-
if (vErrors === null) {
|
|
1059
|
-
vErrors = [err76];
|
|
1060
|
-
} else {
|
|
1061
|
-
vErrors.push(err76);
|
|
1062
|
-
}
|
|
1063
|
-
errors++;
|
|
1064
|
-
}
|
|
1065
|
-
const len2 = data38.length;
|
|
1066
|
-
for (let i3 = 0; i3 < len2; i3++) {
|
|
1067
|
-
let data39 = data38[i3];
|
|
1068
|
-
if (typeof data39 !== "string") {
|
|
1069
|
-
const err77 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope/" + i3, schemaPath: "#/properties/leases/properties/permissions/items/properties/scope/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1070
|
-
if (vErrors === null) {
|
|
1071
|
-
vErrors = [err77];
|
|
1072
|
-
} else {
|
|
1073
|
-
vErrors.push(err77);
|
|
1074
|
-
}
|
|
1075
|
-
errors++;
|
|
1076
|
-
}
|
|
1077
|
-
if (!(data39 === "send-manifest" || data39 === "get-manifest" || data39 === "logs" || data39 === "shell" || data39 === "events" || data39 === "status" || data39 === "restart" || data39 === "hostname-migrate" || data39 === "ip-migrate")) {
|
|
1078
|
-
const err78 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope/" + i3, schemaPath: "#/properties/leases/properties/permissions/items/properties/scope/items/enum", keyword: "enum", params: { allowedValues: schema11.properties.leases.properties.permissions.items.properties.scope.items.enum }, message: "must be equal to one of the allowed values" };
|
|
1079
|
-
if (vErrors === null) {
|
|
1080
|
-
vErrors = [err78];
|
|
1081
|
-
} else {
|
|
1082
|
-
vErrors.push(err78);
|
|
1083
|
-
}
|
|
1084
|
-
errors++;
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
let i4 = data38.length;
|
|
1088
|
-
let j1;
|
|
1089
|
-
if (i4 > 1) {
|
|
1090
|
-
const indices1 = {};
|
|
1091
|
-
for (; i4--; ) {
|
|
1092
|
-
let item1 = data38[i4];
|
|
1093
|
-
if (typeof item1 !== "string") {
|
|
1094
|
-
continue;
|
|
1095
|
-
}
|
|
1096
|
-
if (typeof indices1[item1] == "number") {
|
|
1097
|
-
j1 = indices1[item1];
|
|
1098
|
-
const err79 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/properties/scope/uniqueItems", keyword: "uniqueItems", params: { i: i4, j: j1 }, message: "must NOT have duplicate items (items ## " + j1 + " and " + i4 + " are identical)" };
|
|
1099
|
-
if (vErrors === null) {
|
|
1100
|
-
vErrors = [err79];
|
|
1101
|
-
} else {
|
|
1102
|
-
vErrors.push(err79);
|
|
1103
|
-
}
|
|
1104
|
-
errors++;
|
|
1105
|
-
break;
|
|
1106
|
-
}
|
|
1107
|
-
indices1[item1] = i4;
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
} else {
|
|
1111
|
-
const err80 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/properties/scope/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
1112
|
-
if (vErrors === null) {
|
|
1113
|
-
vErrors = [err80];
|
|
1114
|
-
} else {
|
|
1115
|
-
vErrors.push(err80);
|
|
1116
|
-
}
|
|
1117
|
-
errors++;
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
if (data27.deployments !== void 0) {
|
|
1121
|
-
let data40 = data27.deployments;
|
|
1122
|
-
if (Array.isArray(data40)) {
|
|
1123
|
-
if (data40.length < 1) {
|
|
1124
|
-
const err81 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
1125
|
-
if (vErrors === null) {
|
|
1126
|
-
vErrors = [err81];
|
|
1127
|
-
} else {
|
|
1128
|
-
vErrors.push(err81);
|
|
1129
|
-
}
|
|
1130
|
-
errors++;
|
|
1131
|
-
}
|
|
1132
|
-
const len3 = data40.length;
|
|
1133
|
-
for (let i5 = 0; i5 < len3; i5++) {
|
|
1134
|
-
let data41 = data40[i5];
|
|
1135
|
-
if (data41 && typeof data41 == "object" && !Array.isArray(data41)) {
|
|
1136
|
-
if (data41.dseq === void 0) {
|
|
1137
|
-
const err82 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/required", keyword: "required", params: { missingProperty: "dseq" }, message: "must have required property 'dseq'" };
|
|
1138
|
-
if (vErrors === null) {
|
|
1139
|
-
vErrors = [err82];
|
|
1140
|
-
} else {
|
|
1141
|
-
vErrors.push(err82);
|
|
1142
|
-
}
|
|
1143
|
-
errors++;
|
|
1144
|
-
}
|
|
1145
|
-
if (data41.scope === void 0) {
|
|
1146
|
-
const err83 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/required", keyword: "required", params: { missingProperty: "scope" }, message: "must have required property 'scope'" };
|
|
1147
|
-
if (vErrors === null) {
|
|
1148
|
-
vErrors = [err83];
|
|
1149
|
-
} else {
|
|
1150
|
-
vErrors.push(err83);
|
|
1151
|
-
}
|
|
1152
|
-
errors++;
|
|
1153
|
-
}
|
|
1154
|
-
if (data41.services === void 0) {
|
|
1155
|
-
const err84 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/required", keyword: "required", params: { missingProperty: "services" }, message: "must have required property 'services'" };
|
|
1156
|
-
if (vErrors === null) {
|
|
1157
|
-
vErrors = [err84];
|
|
1158
|
-
} else {
|
|
1159
|
-
vErrors.push(err84);
|
|
1160
|
-
}
|
|
1161
|
-
errors++;
|
|
1162
|
-
}
|
|
1163
|
-
for (const key3 in data41) {
|
|
1164
|
-
if (!(key3 === "dseq" || key3 === "scope" || key3 === "gseq" || key3 === "oseq" || key3 === "services")) {
|
|
1165
|
-
const err85 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
|
|
1166
|
-
if (vErrors === null) {
|
|
1167
|
-
vErrors = [err85];
|
|
1168
|
-
} else {
|
|
1169
|
-
vErrors.push(err85);
|
|
1170
|
-
}
|
|
1171
|
-
errors++;
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
if (data41.gseq !== void 0) {
|
|
1175
|
-
if (data41.dseq === void 0) {
|
|
1176
|
-
const err86 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/dependencies", keyword: "dependencies", params: {
|
|
1177
|
-
property: "gseq",
|
|
1178
|
-
missingProperty: "dseq",
|
|
1179
|
-
depsCount: 1,
|
|
1180
|
-
deps: "dseq"
|
|
1181
|
-
}, message: "must have property dseq when property gseq is present" };
|
|
1182
|
-
if (vErrors === null) {
|
|
1183
|
-
vErrors = [err86];
|
|
1184
|
-
} else {
|
|
1185
|
-
vErrors.push(err86);
|
|
1186
|
-
}
|
|
1187
|
-
errors++;
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
if (data41.oseq !== void 0) {
|
|
1191
|
-
if (data41.dseq === void 0) {
|
|
1192
|
-
const err87 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/dependencies", keyword: "dependencies", params: {
|
|
1193
|
-
property: "oseq",
|
|
1194
|
-
missingProperty: "dseq",
|
|
1195
|
-
depsCount: 2,
|
|
1196
|
-
deps: "dseq, gseq"
|
|
1197
|
-
}, message: "must have properties dseq, gseq when property oseq is present" };
|
|
1198
|
-
if (vErrors === null) {
|
|
1199
|
-
vErrors = [err87];
|
|
1200
|
-
} else {
|
|
1201
|
-
vErrors.push(err87);
|
|
1202
|
-
}
|
|
1203
|
-
errors++;
|
|
1204
|
-
}
|
|
1205
|
-
if (data41.gseq === void 0) {
|
|
1206
|
-
const err88 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/dependencies", keyword: "dependencies", params: {
|
|
1207
|
-
property: "oseq",
|
|
1208
|
-
missingProperty: "gseq",
|
|
1209
|
-
depsCount: 2,
|
|
1210
|
-
deps: "dseq, gseq"
|
|
1211
|
-
}, message: "must have properties dseq, gseq when property oseq is present" };
|
|
1212
|
-
if (vErrors === null) {
|
|
1213
|
-
vErrors = [err88];
|
|
1214
|
-
} else {
|
|
1215
|
-
vErrors.push(err88);
|
|
1216
|
-
}
|
|
1217
|
-
errors++;
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
if (data41.services !== void 0) {
|
|
1221
|
-
if (data41.dseq === void 0) {
|
|
1222
|
-
const err89 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/dependencies", keyword: "dependencies", params: {
|
|
1223
|
-
property: "services",
|
|
1224
|
-
missingProperty: "dseq",
|
|
1225
|
-
depsCount: 1,
|
|
1226
|
-
deps: "dseq"
|
|
1227
|
-
}, message: "must have property dseq when property services is present" };
|
|
1228
|
-
if (vErrors === null) {
|
|
1229
|
-
vErrors = [err89];
|
|
1230
|
-
} else {
|
|
1231
|
-
vErrors.push(err89);
|
|
1232
|
-
}
|
|
1233
|
-
errors++;
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
if (data41.dseq !== void 0) {
|
|
1237
|
-
let data42 = data41.dseq;
|
|
1238
|
-
if (!(typeof data42 == "number" && (!(data42 % 1) && !isNaN(data42)))) {
|
|
1239
|
-
const err90 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/dseq", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/dseq/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
1240
|
-
if (vErrors === null) {
|
|
1241
|
-
vErrors = [err90];
|
|
1242
|
-
} else {
|
|
1243
|
-
vErrors.push(err90);
|
|
1244
|
-
}
|
|
1245
|
-
errors++;
|
|
1246
|
-
}
|
|
1247
|
-
if (typeof data42 == "number") {
|
|
1248
|
-
if (data42 < 1 || isNaN(data42)) {
|
|
1249
|
-
const err91 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/dseq", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/dseq/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
|
|
1250
|
-
if (vErrors === null) {
|
|
1251
|
-
vErrors = [err91];
|
|
1252
|
-
} else {
|
|
1253
|
-
vErrors.push(err91);
|
|
1254
|
-
}
|
|
1255
|
-
errors++;
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
if (data41.scope !== void 0) {
|
|
1260
|
-
let data43 = data41.scope;
|
|
1261
|
-
if (Array.isArray(data43)) {
|
|
1262
|
-
if (data43.length < 1) {
|
|
1263
|
-
const err92 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
1264
|
-
if (vErrors === null) {
|
|
1265
|
-
vErrors = [err92];
|
|
1266
|
-
} else {
|
|
1267
|
-
vErrors.push(err92);
|
|
1268
|
-
}
|
|
1269
|
-
errors++;
|
|
1270
|
-
}
|
|
1271
|
-
const len4 = data43.length;
|
|
1272
|
-
for (let i6 = 0; i6 < len4; i6++) {
|
|
1273
|
-
let data44 = data43[i6];
|
|
1274
|
-
if (typeof data44 !== "string") {
|
|
1275
|
-
const err93 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/scope/" + i6, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/scope/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1276
|
-
if (vErrors === null) {
|
|
1277
|
-
vErrors = [err93];
|
|
1278
|
-
} else {
|
|
1279
|
-
vErrors.push(err93);
|
|
1280
|
-
}
|
|
1281
|
-
errors++;
|
|
1282
|
-
}
|
|
1283
|
-
if (!(data44 === "send-manifest" || data44 === "get-manifest" || data44 === "logs" || data44 === "shell" || data44 === "events" || data44 === "status" || data44 === "restart" || data44 === "hostname-migrate" || data44 === "ip-migrate")) {
|
|
1284
|
-
const err94 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/scope/" + i6, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/scope/items/enum", keyword: "enum", params: { allowedValues: schema11.properties.leases.properties.permissions.items.properties.deployments.items.properties.scope.items.enum }, message: "must be equal to one of the allowed values" };
|
|
1285
|
-
if (vErrors === null) {
|
|
1286
|
-
vErrors = [err94];
|
|
1287
|
-
} else {
|
|
1288
|
-
vErrors.push(err94);
|
|
1289
|
-
}
|
|
1290
|
-
errors++;
|
|
1291
|
-
}
|
|
1292
|
-
}
|
|
1293
|
-
let i7 = data43.length;
|
|
1294
|
-
let j2;
|
|
1295
|
-
if (i7 > 1) {
|
|
1296
|
-
const indices2 = {};
|
|
1297
|
-
for (; i7--; ) {
|
|
1298
|
-
let item2 = data43[i7];
|
|
1299
|
-
if (typeof item2 !== "string") {
|
|
1300
|
-
continue;
|
|
1301
|
-
}
|
|
1302
|
-
if (typeof indices2[item2] == "number") {
|
|
1303
|
-
j2 = indices2[item2];
|
|
1304
|
-
const err95 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/scope/uniqueItems", keyword: "uniqueItems", params: { i: i7, j: j2 }, message: "must NOT have duplicate items (items ## " + j2 + " and " + i7 + " are identical)" };
|
|
1305
|
-
if (vErrors === null) {
|
|
1306
|
-
vErrors = [err95];
|
|
1307
|
-
} else {
|
|
1308
|
-
vErrors.push(err95);
|
|
1309
|
-
}
|
|
1310
|
-
errors++;
|
|
1311
|
-
break;
|
|
1312
|
-
}
|
|
1313
|
-
indices2[item2] = i7;
|
|
1314
|
-
}
|
|
1315
|
-
}
|
|
1316
|
-
} else {
|
|
1317
|
-
const err96 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/scope/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
1318
|
-
if (vErrors === null) {
|
|
1319
|
-
vErrors = [err96];
|
|
1320
|
-
} else {
|
|
1321
|
-
vErrors.push(err96);
|
|
1322
|
-
}
|
|
1323
|
-
errors++;
|
|
1324
|
-
}
|
|
1325
|
-
}
|
|
1326
|
-
if (data41.gseq !== void 0) {
|
|
1327
|
-
let data45 = data41.gseq;
|
|
1328
|
-
if (!(typeof data45 == "number" && (!(data45 % 1) && !isNaN(data45)))) {
|
|
1329
|
-
const err97 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/gseq", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/gseq/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
1330
|
-
if (vErrors === null) {
|
|
1331
|
-
vErrors = [err97];
|
|
1332
|
-
} else {
|
|
1333
|
-
vErrors.push(err97);
|
|
1334
|
-
}
|
|
1335
|
-
errors++;
|
|
1336
|
-
}
|
|
1337
|
-
if (typeof data45 == "number") {
|
|
1338
|
-
if (data45 < 0 || isNaN(data45)) {
|
|
1339
|
-
const err98 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/gseq", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/gseq/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
|
|
1340
|
-
if (vErrors === null) {
|
|
1341
|
-
vErrors = [err98];
|
|
1342
|
-
} else {
|
|
1343
|
-
vErrors.push(err98);
|
|
1344
|
-
}
|
|
1345
|
-
errors++;
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
if (data41.oseq !== void 0) {
|
|
1350
|
-
let data46 = data41.oseq;
|
|
1351
|
-
if (!(typeof data46 == "number" && (!(data46 % 1) && !isNaN(data46)))) {
|
|
1352
|
-
const err99 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/oseq", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/oseq/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
1353
|
-
if (vErrors === null) {
|
|
1354
|
-
vErrors = [err99];
|
|
1355
|
-
} else {
|
|
1356
|
-
vErrors.push(err99);
|
|
1357
|
-
}
|
|
1358
|
-
errors++;
|
|
1359
|
-
}
|
|
1360
|
-
if (typeof data46 == "number") {
|
|
1361
|
-
if (data46 < 0 || isNaN(data46)) {
|
|
1362
|
-
const err100 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/oseq", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/oseq/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
|
|
1363
|
-
if (vErrors === null) {
|
|
1364
|
-
vErrors = [err100];
|
|
1365
|
-
} else {
|
|
1366
|
-
vErrors.push(err100);
|
|
1367
|
-
}
|
|
1368
|
-
errors++;
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
if (data41.services !== void 0) {
|
|
1373
|
-
let data47 = data41.services;
|
|
1374
|
-
if (Array.isArray(data47)) {
|
|
1375
|
-
if (data47.length < 1) {
|
|
1376
|
-
const err101 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/services", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/services/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
1377
|
-
if (vErrors === null) {
|
|
1378
|
-
vErrors = [err101];
|
|
1379
|
-
} else {
|
|
1380
|
-
vErrors.push(err101);
|
|
1381
|
-
}
|
|
1382
|
-
errors++;
|
|
1383
|
-
}
|
|
1384
|
-
const len5 = data47.length;
|
|
1385
|
-
for (let i8 = 0; i8 < len5; i8++) {
|
|
1386
|
-
let data48 = data47[i8];
|
|
1387
|
-
if (typeof data48 === "string") {
|
|
1388
|
-
if (func2(data48) < 1) {
|
|
1389
|
-
const err102 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/services/" + i8, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/services/items/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
1390
|
-
if (vErrors === null) {
|
|
1391
|
-
vErrors = [err102];
|
|
1392
|
-
} else {
|
|
1393
|
-
vErrors.push(err102);
|
|
1394
|
-
}
|
|
1395
|
-
errors++;
|
|
1396
|
-
}
|
|
1397
|
-
} else {
|
|
1398
|
-
const err103 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/services/" + i8, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/services/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1399
|
-
if (vErrors === null) {
|
|
1400
|
-
vErrors = [err103];
|
|
1401
|
-
} else {
|
|
1402
|
-
vErrors.push(err103);
|
|
1403
|
-
}
|
|
1404
|
-
errors++;
|
|
1405
|
-
}
|
|
1406
|
-
}
|
|
1407
|
-
let i9 = data47.length;
|
|
1408
|
-
let j3;
|
|
1409
|
-
if (i9 > 1) {
|
|
1410
|
-
const indices3 = {};
|
|
1411
|
-
for (; i9--; ) {
|
|
1412
|
-
let item3 = data47[i9];
|
|
1413
|
-
if (typeof item3 !== "string") {
|
|
1414
|
-
continue;
|
|
1415
|
-
}
|
|
1416
|
-
if (typeof indices3[item3] == "number") {
|
|
1417
|
-
j3 = indices3[item3];
|
|
1418
|
-
const err104 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/services", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/services/uniqueItems", keyword: "uniqueItems", params: { i: i9, j: j3 }, message: "must NOT have duplicate items (items ## " + j3 + " and " + i9 + " are identical)" };
|
|
1419
|
-
if (vErrors === null) {
|
|
1420
|
-
vErrors = [err104];
|
|
1421
|
-
} else {
|
|
1422
|
-
vErrors.push(err104);
|
|
1423
|
-
}
|
|
1424
|
-
errors++;
|
|
1425
|
-
break;
|
|
1426
|
-
}
|
|
1427
|
-
indices3[item3] = i9;
|
|
1428
|
-
}
|
|
1429
|
-
}
|
|
1430
|
-
} else {
|
|
1431
|
-
const err105 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/services", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/services/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
1432
|
-
if (vErrors === null) {
|
|
1433
|
-
vErrors = [err105];
|
|
1434
|
-
} else {
|
|
1435
|
-
vErrors.push(err105);
|
|
1436
|
-
}
|
|
1437
|
-
errors++;
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
} else {
|
|
1441
|
-
const err106 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1442
|
-
if (vErrors === null) {
|
|
1443
|
-
vErrors = [err106];
|
|
1444
|
-
} else {
|
|
1445
|
-
vErrors.push(err106);
|
|
1446
|
-
}
|
|
1447
|
-
errors++;
|
|
1448
|
-
}
|
|
1449
|
-
}
|
|
1450
|
-
} else {
|
|
1451
|
-
const err107 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
1452
|
-
if (vErrors === null) {
|
|
1453
|
-
vErrors = [err107];
|
|
1454
|
-
} else {
|
|
1455
|
-
vErrors.push(err107);
|
|
1456
|
-
}
|
|
1457
|
-
errors++;
|
|
1458
|
-
}
|
|
1459
|
-
}
|
|
1460
|
-
} else {
|
|
1461
|
-
const err108 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1462
|
-
if (vErrors === null) {
|
|
1463
|
-
vErrors = [err108];
|
|
1464
|
-
} else {
|
|
1465
|
-
vErrors.push(err108);
|
|
1466
|
-
}
|
|
1467
|
-
errors++;
|
|
1468
|
-
}
|
|
1469
|
-
}
|
|
1470
|
-
} else {
|
|
1471
|
-
const err109 = { instancePath: instancePath + "/leases/permissions", schemaPath: "#/properties/leases/properties/permissions/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
1472
|
-
if (vErrors === null) {
|
|
1473
|
-
vErrors = [err109];
|
|
1474
|
-
} else {
|
|
1475
|
-
vErrors.push(err109);
|
|
1476
|
-
}
|
|
1477
|
-
errors++;
|
|
1478
|
-
}
|
|
1479
|
-
}
|
|
1480
|
-
} else {
|
|
1481
|
-
const err110 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1482
|
-
if (vErrors === null) {
|
|
1483
|
-
vErrors = [err110];
|
|
1484
|
-
} else {
|
|
1485
|
-
vErrors.push(err110);
|
|
1486
|
-
}
|
|
1487
|
-
errors++;
|
|
1284
|
+
if (!validate11(data.leases, { instancePath: instancePath + "/leases", parentData: data, parentDataProperty: "leases", rootData })) {
|
|
1285
|
+
vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);
|
|
1286
|
+
errors = vErrors.length;
|
|
1488
1287
|
}
|
|
1489
1288
|
}
|
|
1490
1289
|
} else {
|
|
1491
|
-
const
|
|
1290
|
+
const err19 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1492
1291
|
if (vErrors === null) {
|
|
1493
|
-
vErrors = [
|
|
1292
|
+
vErrors = [err19];
|
|
1494
1293
|
} else {
|
|
1495
|
-
vErrors.push(
|
|
1294
|
+
vErrors.push(err19);
|
|
1496
1295
|
}
|
|
1497
1296
|
errors++;
|
|
1498
1297
|
}
|