@nestia/migrate 0.9.7 → 0.11.0
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/lib/MigrateApplication.d.ts +3 -1
- package/lib/MigrateApplication.js +1558 -1507
- package/lib/MigrateApplication.js.map +1 -1
- package/lib/analyzers/MigrateMethodAnalyzer.js +31 -18
- package/lib/analyzers/MigrateMethodAnalyzer.js.map +1 -1
- package/lib/bundles/NEST_TEMPLATE.js +1 -1
- package/lib/internal/MigrateCommander.js +1 -1
- package/lib/internal/MigrateCommander.js.map +1 -1
- package/lib/programmers/MigrateSchemaProgrammer.js +1 -1
- package/lib/programmers/MigrateSchemaProgrammer.js.map +1 -1
- package/lib/structures/ISwaggerComponents.d.ts +5 -1
- package/lib/structures/ISwaggerRoute.d.ts +4 -33
- package/lib/structures/ISwaggerRouteBodyContent.d.ts +14 -0
- package/lib/structures/ISwaggerRouteBodyContent.js +3 -0
- package/lib/structures/ISwaggerRouteBodyContent.js.map +1 -0
- package/lib/structures/ISwaggerRouteHeader.js +2 -0
- package/lib/structures/ISwaggerRouteHeader.js.map +1 -0
- package/lib/structures/ISwaggerRouteRequestBody.d.ts +11 -0
- package/lib/structures/ISwaggerRouteRequestBody.js +3 -0
- package/lib/structures/ISwaggerRouteRequestBody.js.map +1 -0
- package/lib/structures/ISwaggerRouteResponse.d.ts +10 -0
- package/lib/structures/ISwaggerRouteResponse.js +3 -0
- package/lib/structures/ISwaggerRouteResponse.js.map +1 -0
- package/lib/structures/ISwaggerV20.d.ts +8 -0
- package/lib/structures/ISwaggerV20.js +3 -0
- package/lib/structures/ISwaggerV20.js.map +1 -0
- package/lib/structures/ISwaggerV31.d.ts +9 -0
- package/lib/structures/ISwaggerV31.js +3 -0
- package/lib/structures/ISwaggerV31.js.map +1 -0
- package/lib/utils/OpenApiConverter.d.ts +7 -0
- package/lib/utils/OpenApiConverter.js +3132 -0
- package/lib/utils/OpenApiConverter.js.map +1 -0
- package/lib/utils/SwaggerComponentsExplorer.d.ts +9 -0
- package/lib/utils/SwaggerComponentsExplorer.js +29 -0
- package/lib/utils/SwaggerComponentsExplorer.js.map +1 -0
- package/lib/utils/SwaggerTypeChecker.d.ts +0 -2
- package/lib/utils/SwaggerTypeChecker.js +0 -6
- package/lib/utils/SwaggerTypeChecker.js.map +1 -1
- package/package.json +78 -74
- package/src/MigrateApplication.ts +17 -8
- package/src/analyzers/MigrateMethodAnalyzer.ts +59 -19
- package/src/bundles/NEST_TEMPLATE.ts +1 -1
- package/src/internal/MigrateCommander.ts +1 -1
- package/src/programmers/MigrateSchemaProgrammer.ts +4 -1
- package/src/structures/ISwagger.ts +23 -23
- package/src/structures/ISwaggerComponents.ts +5 -1
- package/src/structures/ISwaggerRoute.ts +7 -36
- package/src/structures/ISwaggerRouteBodyContent.ts +15 -0
- package/src/structures/ISwaggerRouteHeader.ts +0 -0
- package/src/structures/ISwaggerRouteRequestBody.ts +12 -0
- package/src/structures/ISwaggerRouteResponse.ts +11 -0
- package/src/structures/ISwaggerV20.ts +10 -0
- package/src/structures/ISwaggerV31.ts +10 -0
- package/src/utils/OpenApiConverter.ts +20 -0
- package/src/utils/SwaggerComponentsExplorer.ts +43 -0
- package/src/utils/SwaggerTypeChecker.ts +0 -12
- /package/{src/structures/ISwaggerRouteHeaders.ts → lib/structures/ISwaggerRouteHeader.d.ts} +0 -0
@@ -0,0 +1,3132 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
exports.OpenApiConverter = void 0;
|
16
|
+
const swagger2openapi_1 = __importDefault(require("swagger2openapi"));
|
17
|
+
const typia_1 = __importDefault(require("typia"));
|
18
|
+
const openapi_down_convert_1 = require("@apiture/openapi-down-convert");
|
19
|
+
var OpenApiConverter;
|
20
|
+
(function (OpenApiConverter) {
|
21
|
+
OpenApiConverter.v2_0 = (swagger) => __awaiter(this, void 0, void 0, function* () {
|
22
|
+
const output = yield swagger2openapi_1.default.convertObj(swagger, {});
|
23
|
+
return ((input, errorFactory) => {
|
24
|
+
const __is = input => {
|
25
|
+
const $io0 = input => "string" === typeof input.openapi && RegExp(/^3\.0\.[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(input.openapi) && ("object" === typeof input.info && null !== input.info && $io1(input.info)) && (Array.isArray(input.servers) && input.servers.every(elem => "object" === typeof elem && null !== elem && $io4(elem))) && ("object" === typeof input.components && null !== input.components && false === Array.isArray(input.components) && $io5(input.components)) && ("object" === typeof input.paths && null !== input.paths && false === Array.isArray(input.paths) && $io38(input.paths)) && (undefined === input.security || Array.isArray(input.security) && input.security.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io44(elem)));
|
26
|
+
const $io1 = input => "string" === typeof input.title && (undefined === input.description || "string" === typeof input.description) && (undefined === input.termsOfService || "string" === typeof input.termsOfService && (/\/|:/.test(input.termsOfService) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.termsOfService))) && (undefined === input.contact || "object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) && $io2(input.contact)) && (undefined === input.license || "object" === typeof input.license && null !== input.license && $io3(input.license)) && "string" === typeof input.version;
|
27
|
+
const $io2 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.url || "string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url))) && (undefined === input.email || "string" === typeof input.email && /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(input.email));
|
28
|
+
const $io3 = input => "string" === typeof input.name && (undefined === input.url || "string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url)));
|
29
|
+
const $io4 = input => "string" === typeof input.url && (undefined === input.description || "string" === typeof input.description);
|
30
|
+
const $io5 = input => (undefined === input.parameters || "object" === typeof input.parameters && null !== input.parameters && false === Array.isArray(input.parameters) && $io6(input.parameters)) && (undefined === input.requestBodies || "object" === typeof input.requestBodies && null !== input.requestBodies && false === Array.isArray(input.requestBodies) && $io21(input.requestBodies)) && (undefined === input.responses || "object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) && $io25(input.responses)) && (undefined === input.schemas || "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && $io18(input.schemas)) && (undefined === input.securitySchemes || "object" === typeof input.securitySchemes && null !== input.securitySchemes && false === Array.isArray(input.securitySchemes) && $io27(input.securitySchemes)) && (undefined === input["x-nestia-namespace"] || "string" === typeof input["x-nestia-namespace"]);
|
31
|
+
const $io6 = input => Object.keys(input).every(key => {
|
32
|
+
const value = input[key];
|
33
|
+
if (undefined === value)
|
34
|
+
return true;
|
35
|
+
return "object" === typeof value && null !== value && $io7(value);
|
36
|
+
});
|
37
|
+
const $io7 = input => (undefined === input.name || "string" === typeof input.name) && ("cookie" === input["in"] || "header" === input["in"] || "path" === input["in"] || "query" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description);
|
38
|
+
const $io8 = input => null !== input.type && undefined === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
39
|
+
const $io9 = input => "null" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
40
|
+
const $io10 = input => Array.isArray(input.anyOf) && input.anyOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $iu0(elem)) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
41
|
+
const $io11 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $iu0(elem)) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
42
|
+
const $io12 = input => (undefined === input["default"] || "boolean" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "boolean" === typeof elem)) && "boolean" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
43
|
+
const $io13 = input => (undefined === input["default"] || "number" === typeof input["default"] && (Math.floor(input["default"]) === input["default"] && -2147483648 <= input["default"] && input["default"] <= 2147483647)) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "number" === typeof elem)) && (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -2147483648 <= input.minimum && input.minimum <= 2147483647)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -2147483648 <= input.maximum && input.maximum <= 2147483647)) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 4294967295)) && "integer" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
44
|
+
const $io14 = input => (undefined === input["default"] || "number" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "number" === typeof elem)) && (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf) && "number" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
45
|
+
const $io15 = input => (undefined === input["default"] || "string" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "string" === typeof elem)) && (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 4294967295)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 4294967295)) && "string" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
46
|
+
const $io16 = input => "object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) && $iu0(input.items) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 4294967295)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 4294967295)) && (undefined === input["x-typia-tuple"] || "object" === typeof input["x-typia-tuple"] && null !== input["x-typia-tuple"] && $io20(input["x-typia-tuple"])) && "array" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
47
|
+
const $io17 = input => (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io18(input.properties)) && (undefined === input.required || Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && (null !== input.additionalProperties && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) && $iu0(input.additionalProperties))) && (undefined === input["x-typia-patternProperties"] || "object" === typeof input["x-typia-patternProperties"] && null !== input["x-typia-patternProperties"] && false === Array.isArray(input["x-typia-patternProperties"]) && $io18(input["x-typia-patternProperties"])) && "object" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
48
|
+
const $io18 = input => Object.keys(input).every(key => {
|
49
|
+
const value = input[key];
|
50
|
+
if (undefined === value)
|
51
|
+
return true;
|
52
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $iu0(value);
|
53
|
+
});
|
54
|
+
const $io19 = input => "string" === typeof input.$ref && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
55
|
+
const $io20 = input => Array.isArray(input.items) && input.items.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $iu0(elem)) && "array" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
56
|
+
const $io21 = input => Object.keys(input).every(key => {
|
57
|
+
const value = input[key];
|
58
|
+
if (undefined === value)
|
59
|
+
return true;
|
60
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io22(value);
|
61
|
+
});
|
62
|
+
const $io22 = input => (undefined === input.description || "string" === typeof input.description) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.content || "object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && $io23(input.content));
|
63
|
+
const $io23 = input => (undefined === input["text/plain"] || "object" === typeof input["text/plain"] && null !== input["text/plain"] && false === Array.isArray(input["text/plain"]) && $io24(input["text/plain"])) && (undefined === input["application/json"] || "object" === typeof input["application/json"] && null !== input["application/json"] && false === Array.isArray(input["application/json"]) && $io24(input["application/json"])) && (undefined === input["application/x-www-form-urlencoded"] || "object" === typeof input["application/x-www-form-urlencoded"] && null !== input["application/x-www-form-urlencoded"] && false === Array.isArray(input["application/x-www-form-urlencoded"]) && $io24(input["application/x-www-form-urlencoded"])) && (undefined === input["multipart/form-data"] || "object" === typeof input["multipart/form-data"] && null !== input["multipart/form-data"] && false === Array.isArray(input["multipart/form-data"]) && $io24(input["multipart/form-data"])) && (undefined === input["*/*"] || "object" === typeof input["*/*"] && null !== input["*/*"] && false === Array.isArray(input["*/*"]) && $io24(input["*/*"]));
|
64
|
+
const $io24 = input => (undefined === input.schema || "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema)) && (undefined === input["x-nestia-encrypted"] || "boolean" === typeof input["x-nestia-encrypted"]);
|
65
|
+
const $io25 = input => Object.keys(input).every(key => {
|
66
|
+
const value = input[key];
|
67
|
+
if (undefined === value)
|
68
|
+
return true;
|
69
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io26(value);
|
70
|
+
});
|
71
|
+
const $io26 = input => (undefined === input.description || "string" === typeof input.description) && (undefined === input.content || "object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && $io23(input.content));
|
72
|
+
const $io27 = input => Object.keys(input).every(key => {
|
73
|
+
const value = input[key];
|
74
|
+
if (undefined === value)
|
75
|
+
return true;
|
76
|
+
return "object" === typeof value && null !== value && $iu2(value);
|
77
|
+
});
|
78
|
+
const $io28 = input => "http" === input.type && "basic" === input.scheme;
|
79
|
+
const $io29 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat);
|
80
|
+
const $io30 = input => "apiKey" === input.type && (undefined === input["in"] || "cookie" === input["in"] || "header" === input["in"] || "query" === input["in"]) && (undefined === input.name || "string" === typeof input.name);
|
81
|
+
const $io31 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl;
|
82
|
+
const $io32 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && $io33(input.flows)) && (undefined === input.description || "string" === typeof input.description);
|
83
|
+
const $io33 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && $io34(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && $io36(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) && $io37(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) && $io37(input.clientCredentials));
|
84
|
+
const $io34 = input => "string" === typeof input.authorizationUrl && (undefined === input.tokenUrl || "string" === typeof input.tokenUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io35(input.scopes));
|
85
|
+
const $io35 = input => Object.keys(input).every(key => {
|
86
|
+
const value = input[key];
|
87
|
+
if (undefined === value)
|
88
|
+
return true;
|
89
|
+
return "string" === typeof value;
|
90
|
+
});
|
91
|
+
const $io36 = input => "string" === typeof input.authorizationUrl && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io35(input.scopes));
|
92
|
+
const $io37 = input => (undefined === input.tokenUrl || "string" === typeof input.tokenUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io35(input.scopes));
|
93
|
+
const $io38 = input => Object.keys(input).every(key => {
|
94
|
+
const value = input[key];
|
95
|
+
if (undefined === value)
|
96
|
+
return true;
|
97
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io39(value);
|
98
|
+
});
|
99
|
+
const $io39 = input => (undefined === input.get || "object" === typeof input.get && null !== input.get && false === Array.isArray(input.get) && $io40(input.get)) && (undefined === input.post || "object" === typeof input.post && null !== input.post && false === Array.isArray(input.post) && $io40(input.post)) && (undefined === input.patch || "object" === typeof input.patch && null !== input.patch && false === Array.isArray(input.patch) && $io40(input.patch)) && (undefined === input.put || "object" === typeof input.put && null !== input.put && false === Array.isArray(input.put) && $io40(input.put)) && (undefined === input["delete"] || "object" === typeof input["delete"] && null !== input["delete"] && false === Array.isArray(input["delete"]) && $io40(input["delete"]));
|
100
|
+
const $io40 = input => (undefined === input.parameters || Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && $iu1(elem))) && (undefined === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && false === Array.isArray(input.requestBody) && $io22(input.requestBody)) && (undefined === input.responses || "object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) && $io42(input.responses)) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input.security || Array.isArray(input.security) && input.security.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io44(elem))) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input["x-nestia-jsDocTags"] || Array.isArray(input["x-nestia-jsDocTags"]) && input["x-nestia-jsDocTags"].every(elem => "object" === typeof elem && null !== elem && $io45(elem)));
|
101
|
+
const $io41 = input => "string" === typeof input.$ref && RegExp(/^#\/components\/parameters\/(.*)/).test(input.$ref);
|
102
|
+
const $io42 = input => Object.keys(input).every(key => {
|
103
|
+
const value = input[key];
|
104
|
+
if (undefined === value)
|
105
|
+
return true;
|
106
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $iu3(value);
|
107
|
+
});
|
108
|
+
const $io43 = input => "string" === typeof input.$ref && RegExp(/^#\/components\/responses\/(.*)/).test(input.$ref);
|
109
|
+
const $io44 = input => Object.keys(input).every(key => {
|
110
|
+
const value = input[key];
|
111
|
+
if (undefined === value)
|
112
|
+
return true;
|
113
|
+
return Array.isArray(value) && value.every(elem => "string" === typeof elem);
|
114
|
+
});
|
115
|
+
const $io45 = input => "string" === typeof input.name && (undefined === input.text || Array.isArray(input.text) && input.text.every(elem => "object" === typeof elem && null !== elem && $io46(elem)));
|
116
|
+
const $io46 = input => "string" === typeof input.text && "string" === typeof input.kind;
|
117
|
+
const $iu0 = input => (() => {
|
118
|
+
if ("null" === input.type)
|
119
|
+
return $io9(input);
|
120
|
+
else if (undefined !== input.anyOf)
|
121
|
+
return $io10(input);
|
122
|
+
else if (undefined !== input.oneOf)
|
123
|
+
return $io11(input);
|
124
|
+
else if ("boolean" === input.type)
|
125
|
+
return $io12(input);
|
126
|
+
else if ("number" === input.type)
|
127
|
+
return $io14(input);
|
128
|
+
else if ("integer" === input.type)
|
129
|
+
return $io13(input);
|
130
|
+
else if ("string" === input.type)
|
131
|
+
return $io15(input);
|
132
|
+
else if ("array" === input.type)
|
133
|
+
return $io16(input);
|
134
|
+
else if ("object" === input.type)
|
135
|
+
return $io17(input);
|
136
|
+
else if (undefined !== input.$ref)
|
137
|
+
return $io19(input);
|
138
|
+
else
|
139
|
+
return $io8(input);
|
140
|
+
})();
|
141
|
+
const $iu1 = input => (() => {
|
142
|
+
if (undefined !== input["in"])
|
143
|
+
return $io7(input);
|
144
|
+
else if (undefined !== input.$ref)
|
145
|
+
return $io41(input);
|
146
|
+
else
|
147
|
+
return false;
|
148
|
+
})();
|
149
|
+
const $iu2 = input => (() => {
|
150
|
+
if ("basic" === input.scheme)
|
151
|
+
return $io28(input);
|
152
|
+
else if ("bearer" === input.scheme)
|
153
|
+
return $io29(input);
|
154
|
+
else if ("apiKey" === input.type)
|
155
|
+
return $io30(input);
|
156
|
+
else if ("openIdConnect" === input.type)
|
157
|
+
return $io31(input);
|
158
|
+
else if ("oauth2" === input.type)
|
159
|
+
return $io32(input);
|
160
|
+
else
|
161
|
+
return false;
|
162
|
+
})();
|
163
|
+
const $iu3 = input => (() => {
|
164
|
+
if (undefined !== input.$ref)
|
165
|
+
return $io43(input);
|
166
|
+
else
|
167
|
+
return $io26(input);
|
168
|
+
})();
|
169
|
+
return "object" === typeof input && null !== input && $io0(input);
|
170
|
+
};
|
171
|
+
if (false === __is(input))
|
172
|
+
((input, _path, _exceptionable = true) => {
|
173
|
+
const $guard = typia_1.default.assert.guard;
|
174
|
+
const $join = typia_1.default.assert.join;
|
175
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.openapi && RegExp(/^3\.0\.[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(input.openapi) || $guard(_exceptionable, {
|
176
|
+
path: _path + ".openapi",
|
177
|
+
expected: "`3.0.${number}`",
|
178
|
+
value: input.openapi
|
179
|
+
}, errorFactory)) && (("object" === typeof input.info && null !== input.info || $guard(_exceptionable, {
|
180
|
+
path: _path + ".info",
|
181
|
+
expected: "ISwaggerInfo",
|
182
|
+
value: input.info
|
183
|
+
}, errorFactory)) && $ao1(input.info, _path + ".info", true && _exceptionable) || $guard(_exceptionable, {
|
184
|
+
path: _path + ".info",
|
185
|
+
expected: "ISwaggerInfo",
|
186
|
+
value: input.info
|
187
|
+
}, errorFactory)) && ((Array.isArray(input.servers) || $guard(_exceptionable, {
|
188
|
+
path: _path + ".servers",
|
189
|
+
expected: "Array<ISwagger.IServer>",
|
190
|
+
value: input.servers
|
191
|
+
}, errorFactory)) && input.servers.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
192
|
+
path: _path + ".servers[" + _index1 + "]",
|
193
|
+
expected: "ISwagger.IServer",
|
194
|
+
value: elem
|
195
|
+
}, errorFactory)) && $ao4(elem, _path + ".servers[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
196
|
+
path: _path + ".servers[" + _index1 + "]",
|
197
|
+
expected: "ISwagger.IServer",
|
198
|
+
value: elem
|
199
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
200
|
+
path: _path + ".servers",
|
201
|
+
expected: "Array<ISwagger.IServer>",
|
202
|
+
value: input.servers
|
203
|
+
}, errorFactory)) && (("object" === typeof input.components && null !== input.components && false === Array.isArray(input.components) || $guard(_exceptionable, {
|
204
|
+
path: _path + ".components",
|
205
|
+
expected: "ISwaggerComponents",
|
206
|
+
value: input.components
|
207
|
+
}, errorFactory)) && $ao5(input.components, _path + ".components", true && _exceptionable) || $guard(_exceptionable, {
|
208
|
+
path: _path + ".components",
|
209
|
+
expected: "ISwaggerComponents",
|
210
|
+
value: input.components
|
211
|
+
}, errorFactory)) && (("object" === typeof input.paths && null !== input.paths && false === Array.isArray(input.paths) || $guard(_exceptionable, {
|
212
|
+
path: _path + ".paths",
|
213
|
+
expected: "Record<string, ISwagger.IPath>",
|
214
|
+
value: input.paths
|
215
|
+
}, errorFactory)) && $ao38(input.paths, _path + ".paths", true && _exceptionable) || $guard(_exceptionable, {
|
216
|
+
path: _path + ".paths",
|
217
|
+
expected: "Record<string, ISwagger.IPath>",
|
218
|
+
value: input.paths
|
219
|
+
}, errorFactory)) && (undefined === input.security || (Array.isArray(input.security) || $guard(_exceptionable, {
|
220
|
+
path: _path + ".security",
|
221
|
+
expected: "(Array<Record<string, Array<string>>> | undefined)",
|
222
|
+
value: input.security
|
223
|
+
}, errorFactory)) && input.security.every((elem, _index2) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
224
|
+
path: _path + ".security[" + _index2 + "]",
|
225
|
+
expected: "Record<string, Array<string>>",
|
226
|
+
value: elem
|
227
|
+
}, errorFactory)) && $ao44(elem, _path + ".security[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
228
|
+
path: _path + ".security[" + _index2 + "]",
|
229
|
+
expected: "Record<string, Array<string>>",
|
230
|
+
value: elem
|
231
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
232
|
+
path: _path + ".security",
|
233
|
+
expected: "(Array<Record<string, Array<string>>> | undefined)",
|
234
|
+
value: input.security
|
235
|
+
}, errorFactory));
|
236
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.title || $guard(_exceptionable, {
|
237
|
+
path: _path + ".title",
|
238
|
+
expected: "string",
|
239
|
+
value: input.title
|
240
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
241
|
+
path: _path + ".description",
|
242
|
+
expected: "(string | undefined)",
|
243
|
+
value: input.description
|
244
|
+
}, errorFactory)) && (undefined === input.termsOfService || "string" === typeof input.termsOfService && (/\/|:/.test(input.termsOfService) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.termsOfService) || $guard(_exceptionable, {
|
245
|
+
path: _path + ".termsOfService",
|
246
|
+
expected: "string & Format<\"uri\">",
|
247
|
+
value: input.termsOfService
|
248
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
249
|
+
path: _path + ".termsOfService",
|
250
|
+
expected: "((string & Format<\"uri\">) | undefined)",
|
251
|
+
value: input.termsOfService
|
252
|
+
}, errorFactory)) && (undefined === input.contact || ("object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) || $guard(_exceptionable, {
|
253
|
+
path: _path + ".contact",
|
254
|
+
expected: "(ISwaggerInfo.IContact | undefined)",
|
255
|
+
value: input.contact
|
256
|
+
}, errorFactory)) && $ao2(input.contact, _path + ".contact", true && _exceptionable) || $guard(_exceptionable, {
|
257
|
+
path: _path + ".contact",
|
258
|
+
expected: "(ISwaggerInfo.IContact | undefined)",
|
259
|
+
value: input.contact
|
260
|
+
}, errorFactory)) && (undefined === input.license || ("object" === typeof input.license && null !== input.license || $guard(_exceptionable, {
|
261
|
+
path: _path + ".license",
|
262
|
+
expected: "(ISwaggerInfo.ILicense | undefined)",
|
263
|
+
value: input.license
|
264
|
+
}, errorFactory)) && $ao3(input.license, _path + ".license", true && _exceptionable) || $guard(_exceptionable, {
|
265
|
+
path: _path + ".license",
|
266
|
+
expected: "(ISwaggerInfo.ILicense | undefined)",
|
267
|
+
value: input.license
|
268
|
+
}, errorFactory)) && ("string" === typeof input.version || $guard(_exceptionable, {
|
269
|
+
path: _path + ".version",
|
270
|
+
expected: "string",
|
271
|
+
value: input.version
|
272
|
+
}, errorFactory));
|
273
|
+
const $ao2 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
274
|
+
path: _path + ".name",
|
275
|
+
expected: "(string | undefined)",
|
276
|
+
value: input.name
|
277
|
+
}, errorFactory)) && (undefined === input.url || "string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url) || $guard(_exceptionable, {
|
278
|
+
path: _path + ".url",
|
279
|
+
expected: "string & Format<\"uri\">",
|
280
|
+
value: input.url
|
281
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
282
|
+
path: _path + ".url",
|
283
|
+
expected: "((string & Format<\"uri\">) | undefined)",
|
284
|
+
value: input.url
|
285
|
+
}, errorFactory)) && (undefined === input.email || "string" === typeof input.email && (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(input.email) || $guard(_exceptionable, {
|
286
|
+
path: _path + ".email",
|
287
|
+
expected: "string & Format<\"email\">",
|
288
|
+
value: input.email
|
289
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
290
|
+
path: _path + ".email",
|
291
|
+
expected: "((string & Format<\"email\">) | undefined)",
|
292
|
+
value: input.email
|
293
|
+
}, errorFactory));
|
294
|
+
const $ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
|
295
|
+
path: _path + ".name",
|
296
|
+
expected: "string",
|
297
|
+
value: input.name
|
298
|
+
}, errorFactory)) && (undefined === input.url || "string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url) || $guard(_exceptionable, {
|
299
|
+
path: _path + ".url",
|
300
|
+
expected: "string & Format<\"uri\">",
|
301
|
+
value: input.url
|
302
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
303
|
+
path: _path + ".url",
|
304
|
+
expected: "((string & Format<\"uri\">) | undefined)",
|
305
|
+
value: input.url
|
306
|
+
}, errorFactory));
|
307
|
+
const $ao4 = (input, _path, _exceptionable = true) => ("string" === typeof input.url || $guard(_exceptionable, {
|
308
|
+
path: _path + ".url",
|
309
|
+
expected: "string",
|
310
|
+
value: input.url
|
311
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
312
|
+
path: _path + ".description",
|
313
|
+
expected: "(string | undefined)",
|
314
|
+
value: input.description
|
315
|
+
}, errorFactory));
|
316
|
+
const $ao5 = (input, _path, _exceptionable = true) => (undefined === input.parameters || ("object" === typeof input.parameters && null !== input.parameters && false === Array.isArray(input.parameters) || $guard(_exceptionable, {
|
317
|
+
path: _path + ".parameters",
|
318
|
+
expected: "(Record<string, ISwaggerRouteParameter> | undefined)",
|
319
|
+
value: input.parameters
|
320
|
+
}, errorFactory)) && $ao6(input.parameters, _path + ".parameters", true && _exceptionable) || $guard(_exceptionable, {
|
321
|
+
path: _path + ".parameters",
|
322
|
+
expected: "(Record<string, ISwaggerRouteParameter> | undefined)",
|
323
|
+
value: input.parameters
|
324
|
+
}, errorFactory)) && (undefined === input.requestBodies || ("object" === typeof input.requestBodies && null !== input.requestBodies && false === Array.isArray(input.requestBodies) || $guard(_exceptionable, {
|
325
|
+
path: _path + ".requestBodies",
|
326
|
+
expected: "(Record<string, ISwaggerRouteRequestBody> | undefined)",
|
327
|
+
value: input.requestBodies
|
328
|
+
}, errorFactory)) && $ao21(input.requestBodies, _path + ".requestBodies", true && _exceptionable) || $guard(_exceptionable, {
|
329
|
+
path: _path + ".requestBodies",
|
330
|
+
expected: "(Record<string, ISwaggerRouteRequestBody> | undefined)",
|
331
|
+
value: input.requestBodies
|
332
|
+
}, errorFactory)) && (undefined === input.responses || ("object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) || $guard(_exceptionable, {
|
333
|
+
path: _path + ".responses",
|
334
|
+
expected: "(Record<string, ISwaggerRouteResponse> | undefined)",
|
335
|
+
value: input.responses
|
336
|
+
}, errorFactory)) && $ao25(input.responses, _path + ".responses", true && _exceptionable) || $guard(_exceptionable, {
|
337
|
+
path: _path + ".responses",
|
338
|
+
expected: "(Record<string, ISwaggerRouteResponse> | undefined)",
|
339
|
+
value: input.responses
|
340
|
+
}, errorFactory)) && (undefined === input.schemas || ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || $guard(_exceptionable, {
|
341
|
+
path: _path + ".schemas",
|
342
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
343
|
+
value: input.schemas
|
344
|
+
}, errorFactory)) && $ao18(input.schemas, _path + ".schemas", true && _exceptionable) || $guard(_exceptionable, {
|
345
|
+
path: _path + ".schemas",
|
346
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
347
|
+
value: input.schemas
|
348
|
+
}, errorFactory)) && (undefined === input.securitySchemes || ("object" === typeof input.securitySchemes && null !== input.securitySchemes && false === Array.isArray(input.securitySchemes) || $guard(_exceptionable, {
|
349
|
+
path: _path + ".securitySchemes",
|
350
|
+
expected: "(Record<string, ISwaggerSecurityScheme> | undefined)",
|
351
|
+
value: input.securitySchemes
|
352
|
+
}, errorFactory)) && $ao27(input.securitySchemes, _path + ".securitySchemes", true && _exceptionable) || $guard(_exceptionable, {
|
353
|
+
path: _path + ".securitySchemes",
|
354
|
+
expected: "(Record<string, ISwaggerSecurityScheme> | undefined)",
|
355
|
+
value: input.securitySchemes
|
356
|
+
}, errorFactory)) && (undefined === input["x-nestia-namespace"] || "string" === typeof input["x-nestia-namespace"] || $guard(_exceptionable, {
|
357
|
+
path: _path + "[\"x-nestia-namespace\"]",
|
358
|
+
expected: "(string | undefined)",
|
359
|
+
value: input["x-nestia-namespace"]
|
360
|
+
}, errorFactory));
|
361
|
+
const $ao6 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
362
|
+
const value = input[key];
|
363
|
+
if (undefined === value)
|
364
|
+
return true;
|
365
|
+
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
366
|
+
path: _path + $join(key),
|
367
|
+
expected: "ISwaggerRouteParameter",
|
368
|
+
value: value
|
369
|
+
}, errorFactory)) && $ao7(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
370
|
+
path: _path + $join(key),
|
371
|
+
expected: "ISwaggerRouteParameter",
|
372
|
+
value: value
|
373
|
+
}, errorFactory);
|
374
|
+
});
|
375
|
+
const $ao7 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
376
|
+
path: _path + ".name",
|
377
|
+
expected: "(string | undefined)",
|
378
|
+
value: input.name
|
379
|
+
}, errorFactory)) && ("cookie" === input["in"] || "header" === input["in"] || "path" === input["in"] || "query" === input["in"] || $guard(_exceptionable, {
|
380
|
+
path: _path + "[\"in\"]",
|
381
|
+
expected: "(\"cookie\" | \"header\" | \"path\" | \"query\")",
|
382
|
+
value: input["in"]
|
383
|
+
}, errorFactory)) && (("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $guard(_exceptionable, {
|
384
|
+
path: _path + ".schema",
|
385
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
386
|
+
value: input.schema
|
387
|
+
}, errorFactory)) && $au0(input.schema, _path + ".schema", true && _exceptionable) || $guard(_exceptionable, {
|
388
|
+
path: _path + ".schema",
|
389
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
390
|
+
value: input.schema
|
391
|
+
}, errorFactory)) && (undefined === input.required || "boolean" === typeof input.required || $guard(_exceptionable, {
|
392
|
+
path: _path + ".required",
|
393
|
+
expected: "(boolean | undefined)",
|
394
|
+
value: input.required
|
395
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
396
|
+
path: _path + ".description",
|
397
|
+
expected: "(string | undefined)",
|
398
|
+
value: input.description
|
399
|
+
}, errorFactory));
|
400
|
+
const $ao8 = (input, _path, _exceptionable = true) => (null !== input.type || $guard(_exceptionable, {
|
401
|
+
path: _path + ".type",
|
402
|
+
expected: "undefined",
|
403
|
+
value: input.type
|
404
|
+
}, errorFactory)) && (undefined === input.type || $guard(_exceptionable, {
|
405
|
+
path: _path + ".type",
|
406
|
+
expected: "undefined",
|
407
|
+
value: input.type
|
408
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
409
|
+
path: _path + ".title",
|
410
|
+
expected: "(string | undefined)",
|
411
|
+
value: input.title
|
412
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
413
|
+
path: _path + ".description",
|
414
|
+
expected: "(string | undefined)",
|
415
|
+
value: input.description
|
416
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
417
|
+
path: _path + ".deprecated",
|
418
|
+
expected: "(boolean | undefined)",
|
419
|
+
value: input.deprecated
|
420
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
421
|
+
path: _path + "[\"x-typia-optional\"]",
|
422
|
+
expected: "(boolean | undefined)",
|
423
|
+
value: input["x-typia-optional"]
|
424
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
425
|
+
path: _path + "[\"x-typia-rest\"]",
|
426
|
+
expected: "(boolean | undefined)",
|
427
|
+
value: input["x-typia-rest"]
|
428
|
+
}, errorFactory));
|
429
|
+
const $ao9 = (input, _path, _exceptionable = true) => ("null" === input.type || $guard(_exceptionable, {
|
430
|
+
path: _path + ".type",
|
431
|
+
expected: "\"null\"",
|
432
|
+
value: input.type
|
433
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
434
|
+
path: _path + ".title",
|
435
|
+
expected: "(string | undefined)",
|
436
|
+
value: input.title
|
437
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
438
|
+
path: _path + ".description",
|
439
|
+
expected: "(string | undefined)",
|
440
|
+
value: input.description
|
441
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
442
|
+
path: _path + ".deprecated",
|
443
|
+
expected: "(boolean | undefined)",
|
444
|
+
value: input.deprecated
|
445
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
446
|
+
path: _path + "[\"x-typia-optional\"]",
|
447
|
+
expected: "(boolean | undefined)",
|
448
|
+
value: input["x-typia-optional"]
|
449
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
450
|
+
path: _path + "[\"x-typia-rest\"]",
|
451
|
+
expected: "(boolean | undefined)",
|
452
|
+
value: input["x-typia-rest"]
|
453
|
+
}, errorFactory));
|
454
|
+
const $ao10 = (input, _path, _exceptionable = true) => ((Array.isArray(input.anyOf) || $guard(_exceptionable, {
|
455
|
+
path: _path + ".anyOf",
|
456
|
+
expected: "Array<ISwaggerSchema>",
|
457
|
+
value: input.anyOf
|
458
|
+
}, errorFactory)) && input.anyOf.every((elem, _index3) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
459
|
+
path: _path + ".anyOf[" + _index3 + "]",
|
460
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
461
|
+
value: elem
|
462
|
+
}, errorFactory)) && $au0(elem, _path + ".anyOf[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
463
|
+
path: _path + ".anyOf[" + _index3 + "]",
|
464
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
465
|
+
value: elem
|
466
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
467
|
+
path: _path + ".anyOf",
|
468
|
+
expected: "Array<ISwaggerSchema>",
|
469
|
+
value: input.anyOf
|
470
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
471
|
+
path: _path + ".title",
|
472
|
+
expected: "(string | undefined)",
|
473
|
+
value: input.title
|
474
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
475
|
+
path: _path + ".description",
|
476
|
+
expected: "(string | undefined)",
|
477
|
+
value: input.description
|
478
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
479
|
+
path: _path + ".deprecated",
|
480
|
+
expected: "(boolean | undefined)",
|
481
|
+
value: input.deprecated
|
482
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
483
|
+
path: _path + "[\"x-typia-optional\"]",
|
484
|
+
expected: "(boolean | undefined)",
|
485
|
+
value: input["x-typia-optional"]
|
486
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
487
|
+
path: _path + "[\"x-typia-rest\"]",
|
488
|
+
expected: "(boolean | undefined)",
|
489
|
+
value: input["x-typia-rest"]
|
490
|
+
}, errorFactory));
|
491
|
+
const $ao11 = (input, _path, _exceptionable = true) => ((Array.isArray(input.oneOf) || $guard(_exceptionable, {
|
492
|
+
path: _path + ".oneOf",
|
493
|
+
expected: "Array<ISwaggerSchema>",
|
494
|
+
value: input.oneOf
|
495
|
+
}, errorFactory)) && input.oneOf.every((elem, _index4) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
496
|
+
path: _path + ".oneOf[" + _index4 + "]",
|
497
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
498
|
+
value: elem
|
499
|
+
}, errorFactory)) && $au0(elem, _path + ".oneOf[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
500
|
+
path: _path + ".oneOf[" + _index4 + "]",
|
501
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
502
|
+
value: elem
|
503
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
504
|
+
path: _path + ".oneOf",
|
505
|
+
expected: "Array<ISwaggerSchema>",
|
506
|
+
value: input.oneOf
|
507
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
508
|
+
path: _path + ".title",
|
509
|
+
expected: "(string | undefined)",
|
510
|
+
value: input.title
|
511
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
512
|
+
path: _path + ".description",
|
513
|
+
expected: "(string | undefined)",
|
514
|
+
value: input.description
|
515
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
516
|
+
path: _path + ".deprecated",
|
517
|
+
expected: "(boolean | undefined)",
|
518
|
+
value: input.deprecated
|
519
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
520
|
+
path: _path + "[\"x-typia-optional\"]",
|
521
|
+
expected: "(boolean | undefined)",
|
522
|
+
value: input["x-typia-optional"]
|
523
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
524
|
+
path: _path + "[\"x-typia-rest\"]",
|
525
|
+
expected: "(boolean | undefined)",
|
526
|
+
value: input["x-typia-rest"]
|
527
|
+
}, errorFactory));
|
528
|
+
const $ao12 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "boolean" === typeof input["default"] || $guard(_exceptionable, {
|
529
|
+
path: _path + "[\"default\"]",
|
530
|
+
expected: "(boolean | undefined)",
|
531
|
+
value: input["default"]
|
532
|
+
}, errorFactory)) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
533
|
+
path: _path + "[\"enum\"]",
|
534
|
+
expected: "(Array<boolean> | undefined)",
|
535
|
+
value: input["enum"]
|
536
|
+
}, errorFactory)) && input["enum"].every((elem, _index5) => "boolean" === typeof elem || $guard(_exceptionable, {
|
537
|
+
path: _path + "[\"enum\"][" + _index5 + "]",
|
538
|
+
expected: "boolean",
|
539
|
+
value: elem
|
540
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
541
|
+
path: _path + "[\"enum\"]",
|
542
|
+
expected: "(Array<boolean> | undefined)",
|
543
|
+
value: input["enum"]
|
544
|
+
}, errorFactory)) && ("boolean" === input.type || $guard(_exceptionable, {
|
545
|
+
path: _path + ".type",
|
546
|
+
expected: "\"boolean\"",
|
547
|
+
value: input.type
|
548
|
+
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
549
|
+
path: _path + ".nullable",
|
550
|
+
expected: "(boolean | undefined)",
|
551
|
+
value: input.nullable
|
552
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
553
|
+
path: _path + ".title",
|
554
|
+
expected: "(string | undefined)",
|
555
|
+
value: input.title
|
556
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
557
|
+
path: _path + ".description",
|
558
|
+
expected: "(string | undefined)",
|
559
|
+
value: input.description
|
560
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
561
|
+
path: _path + ".deprecated",
|
562
|
+
expected: "(boolean | undefined)",
|
563
|
+
value: input.deprecated
|
564
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
565
|
+
path: _path + "[\"x-typia-optional\"]",
|
566
|
+
expected: "(boolean | undefined)",
|
567
|
+
value: input["x-typia-optional"]
|
568
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
569
|
+
path: _path + "[\"x-typia-rest\"]",
|
570
|
+
expected: "(boolean | undefined)",
|
571
|
+
value: input["x-typia-rest"]
|
572
|
+
}, errorFactory));
|
573
|
+
const $ao13 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "number" === typeof input["default"] && (Math.floor(input["default"]) === input["default"] && -2147483648 <= input["default"] && input["default"] <= 2147483647 || $guard(_exceptionable, {
|
574
|
+
path: _path + "[\"default\"]",
|
575
|
+
expected: "number & Type<\"int32\">",
|
576
|
+
value: input["default"]
|
577
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
578
|
+
path: _path + "[\"default\"]",
|
579
|
+
expected: "((number & Type<\"int32\">) | undefined)",
|
580
|
+
value: input["default"]
|
581
|
+
}, errorFactory)) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
582
|
+
path: _path + "[\"enum\"]",
|
583
|
+
expected: "(Array<number> | undefined)",
|
584
|
+
value: input["enum"]
|
585
|
+
}, errorFactory)) && input["enum"].every((elem, _index6) => "number" === typeof elem || $guard(_exceptionable, {
|
586
|
+
path: _path + "[\"enum\"][" + _index6 + "]",
|
587
|
+
expected: "number",
|
588
|
+
value: elem
|
589
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
590
|
+
path: _path + "[\"enum\"]",
|
591
|
+
expected: "(Array<number> | undefined)",
|
592
|
+
value: input["enum"]
|
593
|
+
}, errorFactory)) && (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -2147483648 <= input.minimum && input.minimum <= 2147483647 || $guard(_exceptionable, {
|
594
|
+
path: _path + ".minimum",
|
595
|
+
expected: "number & Type<\"int32\">",
|
596
|
+
value: input.minimum
|
597
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
598
|
+
path: _path + ".minimum",
|
599
|
+
expected: "((number & Type<\"int32\">) | undefined)",
|
600
|
+
value: input.minimum
|
601
|
+
}, errorFactory)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -2147483648 <= input.maximum && input.maximum <= 2147483647 || $guard(_exceptionable, {
|
602
|
+
path: _path + ".maximum",
|
603
|
+
expected: "number & Type<\"int32\">",
|
604
|
+
value: input.maximum
|
605
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
606
|
+
path: _path + ".maximum",
|
607
|
+
expected: "((number & Type<\"int32\">) | undefined)",
|
608
|
+
value: input.maximum
|
609
|
+
}, errorFactory)) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || $guard(_exceptionable, {
|
610
|
+
path: _path + ".exclusiveMinimum",
|
611
|
+
expected: "(boolean | undefined)",
|
612
|
+
value: input.exclusiveMinimum
|
613
|
+
}, errorFactory)) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || $guard(_exceptionable, {
|
614
|
+
path: _path + ".exclusiveMaximum",
|
615
|
+
expected: "(boolean | undefined)",
|
616
|
+
value: input.exclusiveMaximum
|
617
|
+
}, errorFactory)) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 4294967295 || $guard(_exceptionable, {
|
618
|
+
path: _path + ".multipleOf",
|
619
|
+
expected: "number & Type<\"uint32\">",
|
620
|
+
value: input.multipleOf
|
621
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
622
|
+
path: _path + ".multipleOf",
|
623
|
+
expected: "((number & Type<\"uint32\">) | undefined)",
|
624
|
+
value: input.multipleOf
|
625
|
+
}, errorFactory)) && ("integer" === input.type || $guard(_exceptionable, {
|
626
|
+
path: _path + ".type",
|
627
|
+
expected: "\"integer\"",
|
628
|
+
value: input.type
|
629
|
+
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
630
|
+
path: _path + ".nullable",
|
631
|
+
expected: "(boolean | undefined)",
|
632
|
+
value: input.nullable
|
633
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
634
|
+
path: _path + ".title",
|
635
|
+
expected: "(string | undefined)",
|
636
|
+
value: input.title
|
637
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
638
|
+
path: _path + ".description",
|
639
|
+
expected: "(string | undefined)",
|
640
|
+
value: input.description
|
641
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
642
|
+
path: _path + ".deprecated",
|
643
|
+
expected: "(boolean | undefined)",
|
644
|
+
value: input.deprecated
|
645
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
646
|
+
path: _path + "[\"x-typia-optional\"]",
|
647
|
+
expected: "(boolean | undefined)",
|
648
|
+
value: input["x-typia-optional"]
|
649
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
650
|
+
path: _path + "[\"x-typia-rest\"]",
|
651
|
+
expected: "(boolean | undefined)",
|
652
|
+
value: input["x-typia-rest"]
|
653
|
+
}, errorFactory));
|
654
|
+
const $ao14 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "number" === typeof input["default"] || $guard(_exceptionable, {
|
655
|
+
path: _path + "[\"default\"]",
|
656
|
+
expected: "(number | undefined)",
|
657
|
+
value: input["default"]
|
658
|
+
}, errorFactory)) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
659
|
+
path: _path + "[\"enum\"]",
|
660
|
+
expected: "(Array<number> | undefined)",
|
661
|
+
value: input["enum"]
|
662
|
+
}, errorFactory)) && input["enum"].every((elem, _index7) => "number" === typeof elem || $guard(_exceptionable, {
|
663
|
+
path: _path + "[\"enum\"][" + _index7 + "]",
|
664
|
+
expected: "number",
|
665
|
+
value: elem
|
666
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
667
|
+
path: _path + "[\"enum\"]",
|
668
|
+
expected: "(Array<number> | undefined)",
|
669
|
+
value: input["enum"]
|
670
|
+
}, errorFactory)) && (undefined === input.minimum || "number" === typeof input.minimum || $guard(_exceptionable, {
|
671
|
+
path: _path + ".minimum",
|
672
|
+
expected: "(number | undefined)",
|
673
|
+
value: input.minimum
|
674
|
+
}, errorFactory)) && (undefined === input.maximum || "number" === typeof input.maximum || $guard(_exceptionable, {
|
675
|
+
path: _path + ".maximum",
|
676
|
+
expected: "(number | undefined)",
|
677
|
+
value: input.maximum
|
678
|
+
}, errorFactory)) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || $guard(_exceptionable, {
|
679
|
+
path: _path + ".exclusiveMinimum",
|
680
|
+
expected: "(boolean | undefined)",
|
681
|
+
value: input.exclusiveMinimum
|
682
|
+
}, errorFactory)) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || $guard(_exceptionable, {
|
683
|
+
path: _path + ".exclusiveMaximum",
|
684
|
+
expected: "(boolean | undefined)",
|
685
|
+
value: input.exclusiveMaximum
|
686
|
+
}, errorFactory)) && (undefined === input.multipleOf || "number" === typeof input.multipleOf || $guard(_exceptionable, {
|
687
|
+
path: _path + ".multipleOf",
|
688
|
+
expected: "(number | undefined)",
|
689
|
+
value: input.multipleOf
|
690
|
+
}, errorFactory)) && ("number" === input.type || $guard(_exceptionable, {
|
691
|
+
path: _path + ".type",
|
692
|
+
expected: "\"number\"",
|
693
|
+
value: input.type
|
694
|
+
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
695
|
+
path: _path + ".nullable",
|
696
|
+
expected: "(boolean | undefined)",
|
697
|
+
value: input.nullable
|
698
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
699
|
+
path: _path + ".title",
|
700
|
+
expected: "(string | undefined)",
|
701
|
+
value: input.title
|
702
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
703
|
+
path: _path + ".description",
|
704
|
+
expected: "(string | undefined)",
|
705
|
+
value: input.description
|
706
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
707
|
+
path: _path + ".deprecated",
|
708
|
+
expected: "(boolean | undefined)",
|
709
|
+
value: input.deprecated
|
710
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
711
|
+
path: _path + "[\"x-typia-optional\"]",
|
712
|
+
expected: "(boolean | undefined)",
|
713
|
+
value: input["x-typia-optional"]
|
714
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
715
|
+
path: _path + "[\"x-typia-rest\"]",
|
716
|
+
expected: "(boolean | undefined)",
|
717
|
+
value: input["x-typia-rest"]
|
718
|
+
}, errorFactory));
|
719
|
+
const $ao15 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "string" === typeof input["default"] || $guard(_exceptionable, {
|
720
|
+
path: _path + "[\"default\"]",
|
721
|
+
expected: "(string | undefined)",
|
722
|
+
value: input["default"]
|
723
|
+
}, errorFactory)) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
724
|
+
path: _path + "[\"enum\"]",
|
725
|
+
expected: "(Array<string> | undefined)",
|
726
|
+
value: input["enum"]
|
727
|
+
}, errorFactory)) && input["enum"].every((elem, _index8) => "string" === typeof elem || $guard(_exceptionable, {
|
728
|
+
path: _path + "[\"enum\"][" + _index8 + "]",
|
729
|
+
expected: "string",
|
730
|
+
value: elem
|
731
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
732
|
+
path: _path + "[\"enum\"]",
|
733
|
+
expected: "(Array<string> | undefined)",
|
734
|
+
value: input["enum"]
|
735
|
+
}, errorFactory)) && (undefined === input.format || "string" === typeof input.format || $guard(_exceptionable, {
|
736
|
+
path: _path + ".format",
|
737
|
+
expected: "(string | undefined)",
|
738
|
+
value: input.format
|
739
|
+
}, errorFactory)) && (undefined === input.pattern || "string" === typeof input.pattern || $guard(_exceptionable, {
|
740
|
+
path: _path + ".pattern",
|
741
|
+
expected: "(string | undefined)",
|
742
|
+
value: input.pattern
|
743
|
+
}, errorFactory)) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 4294967295 || $guard(_exceptionable, {
|
744
|
+
path: _path + ".minLength",
|
745
|
+
expected: "number & Type<\"uint32\">",
|
746
|
+
value: input.minLength
|
747
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
748
|
+
path: _path + ".minLength",
|
749
|
+
expected: "((number & Type<\"uint32\">) | undefined)",
|
750
|
+
value: input.minLength
|
751
|
+
}, errorFactory)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 4294967295 || $guard(_exceptionable, {
|
752
|
+
path: _path + ".maxLength",
|
753
|
+
expected: "number & Type<\"uint32\">",
|
754
|
+
value: input.maxLength
|
755
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
756
|
+
path: _path + ".maxLength",
|
757
|
+
expected: "((number & Type<\"uint32\">) | undefined)",
|
758
|
+
value: input.maxLength
|
759
|
+
}, errorFactory)) && ("string" === input.type || $guard(_exceptionable, {
|
760
|
+
path: _path + ".type",
|
761
|
+
expected: "\"string\"",
|
762
|
+
value: input.type
|
763
|
+
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
764
|
+
path: _path + ".nullable",
|
765
|
+
expected: "(boolean | undefined)",
|
766
|
+
value: input.nullable
|
767
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
768
|
+
path: _path + ".title",
|
769
|
+
expected: "(string | undefined)",
|
770
|
+
value: input.title
|
771
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
772
|
+
path: _path + ".description",
|
773
|
+
expected: "(string | undefined)",
|
774
|
+
value: input.description
|
775
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
776
|
+
path: _path + ".deprecated",
|
777
|
+
expected: "(boolean | undefined)",
|
778
|
+
value: input.deprecated
|
779
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
780
|
+
path: _path + "[\"x-typia-optional\"]",
|
781
|
+
expected: "(boolean | undefined)",
|
782
|
+
value: input["x-typia-optional"]
|
783
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
784
|
+
path: _path + "[\"x-typia-rest\"]",
|
785
|
+
expected: "(boolean | undefined)",
|
786
|
+
value: input["x-typia-rest"]
|
787
|
+
}, errorFactory));
|
788
|
+
const $ao16 = (input, _path, _exceptionable = true) => (("object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) || $guard(_exceptionable, {
|
789
|
+
path: _path + ".items",
|
790
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
791
|
+
value: input.items
|
792
|
+
}, errorFactory)) && $au0(input.items, _path + ".items", true && _exceptionable) || $guard(_exceptionable, {
|
793
|
+
path: _path + ".items",
|
794
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
795
|
+
value: input.items
|
796
|
+
}, errorFactory)) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 4294967295 || $guard(_exceptionable, {
|
797
|
+
path: _path + ".minItems",
|
798
|
+
expected: "number & Type<\"uint32\">",
|
799
|
+
value: input.minItems
|
800
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
801
|
+
path: _path + ".minItems",
|
802
|
+
expected: "((number & Type<\"uint32\">) | undefined)",
|
803
|
+
value: input.minItems
|
804
|
+
}, errorFactory)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 4294967295 || $guard(_exceptionable, {
|
805
|
+
path: _path + ".maxItems",
|
806
|
+
expected: "number & Type<\"uint32\">",
|
807
|
+
value: input.maxItems
|
808
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
809
|
+
path: _path + ".maxItems",
|
810
|
+
expected: "((number & Type<\"uint32\">) | undefined)",
|
811
|
+
value: input.maxItems
|
812
|
+
}, errorFactory)) && (undefined === input["x-typia-tuple"] || ("object" === typeof input["x-typia-tuple"] && null !== input["x-typia-tuple"] || $guard(_exceptionable, {
|
813
|
+
path: _path + "[\"x-typia-tuple\"]",
|
814
|
+
expected: "(ISwaggerSchema.ITuple | undefined)",
|
815
|
+
value: input["x-typia-tuple"]
|
816
|
+
}, errorFactory)) && $ao20(input["x-typia-tuple"], _path + "[\"x-typia-tuple\"]", true && _exceptionable) || $guard(_exceptionable, {
|
817
|
+
path: _path + "[\"x-typia-tuple\"]",
|
818
|
+
expected: "(ISwaggerSchema.ITuple | undefined)",
|
819
|
+
value: input["x-typia-tuple"]
|
820
|
+
}, errorFactory)) && ("array" === input.type || $guard(_exceptionable, {
|
821
|
+
path: _path + ".type",
|
822
|
+
expected: "\"array\"",
|
823
|
+
value: input.type
|
824
|
+
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
825
|
+
path: _path + ".nullable",
|
826
|
+
expected: "(boolean | undefined)",
|
827
|
+
value: input.nullable
|
828
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
829
|
+
path: _path + ".title",
|
830
|
+
expected: "(string | undefined)",
|
831
|
+
value: input.title
|
832
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
833
|
+
path: _path + ".description",
|
834
|
+
expected: "(string | undefined)",
|
835
|
+
value: input.description
|
836
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
837
|
+
path: _path + ".deprecated",
|
838
|
+
expected: "(boolean | undefined)",
|
839
|
+
value: input.deprecated
|
840
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
841
|
+
path: _path + "[\"x-typia-optional\"]",
|
842
|
+
expected: "(boolean | undefined)",
|
843
|
+
value: input["x-typia-optional"]
|
844
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
845
|
+
path: _path + "[\"x-typia-rest\"]",
|
846
|
+
expected: "(boolean | undefined)",
|
847
|
+
value: input["x-typia-rest"]
|
848
|
+
}, errorFactory));
|
849
|
+
const $ao17 = (input, _path, _exceptionable = true) => (undefined === input.properties || ("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) || $guard(_exceptionable, {
|
850
|
+
path: _path + ".properties",
|
851
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
852
|
+
value: input.properties
|
853
|
+
}, errorFactory)) && $ao18(input.properties, _path + ".properties", true && _exceptionable) || $guard(_exceptionable, {
|
854
|
+
path: _path + ".properties",
|
855
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
856
|
+
value: input.properties
|
857
|
+
}, errorFactory)) && (undefined === input.required || (Array.isArray(input.required) || $guard(_exceptionable, {
|
858
|
+
path: _path + ".required",
|
859
|
+
expected: "(Array<string> | undefined)",
|
860
|
+
value: input.required
|
861
|
+
}, errorFactory)) && input.required.every((elem, _index9) => "string" === typeof elem || $guard(_exceptionable, {
|
862
|
+
path: _path + ".required[" + _index9 + "]",
|
863
|
+
expected: "string",
|
864
|
+
value: elem
|
865
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
866
|
+
path: _path + ".required",
|
867
|
+
expected: "(Array<string> | undefined)",
|
868
|
+
value: input.required
|
869
|
+
}, errorFactory)) && ((null !== input.additionalProperties || $guard(_exceptionable, {
|
870
|
+
path: _path + ".additionalProperties",
|
871
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | boolean | undefined)",
|
872
|
+
value: input.additionalProperties
|
873
|
+
}, errorFactory)) && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || ("object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) || $guard(_exceptionable, {
|
874
|
+
path: _path + ".additionalProperties",
|
875
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | boolean | undefined)",
|
876
|
+
value: input.additionalProperties
|
877
|
+
}, errorFactory)) && $au0(input.additionalProperties, _path + ".additionalProperties", true && _exceptionable) || $guard(_exceptionable, {
|
878
|
+
path: _path + ".additionalProperties",
|
879
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | boolean | undefined)",
|
880
|
+
value: input.additionalProperties
|
881
|
+
}, errorFactory))) && (undefined === input["x-typia-patternProperties"] || ("object" === typeof input["x-typia-patternProperties"] && null !== input["x-typia-patternProperties"] && false === Array.isArray(input["x-typia-patternProperties"]) || $guard(_exceptionable, {
|
882
|
+
path: _path + "[\"x-typia-patternProperties\"]",
|
883
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
884
|
+
value: input["x-typia-patternProperties"]
|
885
|
+
}, errorFactory)) && $ao18(input["x-typia-patternProperties"], _path + "[\"x-typia-patternProperties\"]", true && _exceptionable) || $guard(_exceptionable, {
|
886
|
+
path: _path + "[\"x-typia-patternProperties\"]",
|
887
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
888
|
+
value: input["x-typia-patternProperties"]
|
889
|
+
}, errorFactory)) && ("object" === input.type || $guard(_exceptionable, {
|
890
|
+
path: _path + ".type",
|
891
|
+
expected: "\"object\"",
|
892
|
+
value: input.type
|
893
|
+
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
894
|
+
path: _path + ".nullable",
|
895
|
+
expected: "(boolean | undefined)",
|
896
|
+
value: input.nullable
|
897
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
898
|
+
path: _path + ".title",
|
899
|
+
expected: "(string | undefined)",
|
900
|
+
value: input.title
|
901
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
902
|
+
path: _path + ".description",
|
903
|
+
expected: "(string | undefined)",
|
904
|
+
value: input.description
|
905
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
906
|
+
path: _path + ".deprecated",
|
907
|
+
expected: "(boolean | undefined)",
|
908
|
+
value: input.deprecated
|
909
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
910
|
+
path: _path + "[\"x-typia-optional\"]",
|
911
|
+
expected: "(boolean | undefined)",
|
912
|
+
value: input["x-typia-optional"]
|
913
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
914
|
+
path: _path + "[\"x-typia-rest\"]",
|
915
|
+
expected: "(boolean | undefined)",
|
916
|
+
value: input["x-typia-rest"]
|
917
|
+
}, errorFactory));
|
918
|
+
const $ao18 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
919
|
+
const value = input[key];
|
920
|
+
if (undefined === value)
|
921
|
+
return true;
|
922
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
923
|
+
path: _path + $join(key),
|
924
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
925
|
+
value: value
|
926
|
+
}, errorFactory)) && $au0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
927
|
+
path: _path + $join(key),
|
928
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
929
|
+
value: value
|
930
|
+
}, errorFactory);
|
931
|
+
});
|
932
|
+
const $ao19 = (input, _path, _exceptionable = true) => ("string" === typeof input.$ref || $guard(_exceptionable, {
|
933
|
+
path: _path + ".$ref",
|
934
|
+
expected: "string",
|
935
|
+
value: input.$ref
|
936
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
937
|
+
path: _path + ".title",
|
938
|
+
expected: "(string | undefined)",
|
939
|
+
value: input.title
|
940
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
941
|
+
path: _path + ".description",
|
942
|
+
expected: "(string | undefined)",
|
943
|
+
value: input.description
|
944
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
945
|
+
path: _path + ".deprecated",
|
946
|
+
expected: "(boolean | undefined)",
|
947
|
+
value: input.deprecated
|
948
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
949
|
+
path: _path + "[\"x-typia-optional\"]",
|
950
|
+
expected: "(boolean | undefined)",
|
951
|
+
value: input["x-typia-optional"]
|
952
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
953
|
+
path: _path + "[\"x-typia-rest\"]",
|
954
|
+
expected: "(boolean | undefined)",
|
955
|
+
value: input["x-typia-rest"]
|
956
|
+
}, errorFactory));
|
957
|
+
const $ao20 = (input, _path, _exceptionable = true) => ((Array.isArray(input.items) || $guard(_exceptionable, {
|
958
|
+
path: _path + ".items",
|
959
|
+
expected: "Array<ISwaggerSchema>",
|
960
|
+
value: input.items
|
961
|
+
}, errorFactory)) && input.items.every((elem, _index10) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
962
|
+
path: _path + ".items[" + _index10 + "]",
|
963
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
964
|
+
value: elem
|
965
|
+
}, errorFactory)) && $au0(elem, _path + ".items[" + _index10 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
966
|
+
path: _path + ".items[" + _index10 + "]",
|
967
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
968
|
+
value: elem
|
969
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
970
|
+
path: _path + ".items",
|
971
|
+
expected: "Array<ISwaggerSchema>",
|
972
|
+
value: input.items
|
973
|
+
}, errorFactory)) && ("array" === input.type || $guard(_exceptionable, {
|
974
|
+
path: _path + ".type",
|
975
|
+
expected: "\"array\"",
|
976
|
+
value: input.type
|
977
|
+
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
978
|
+
path: _path + ".nullable",
|
979
|
+
expected: "(boolean | undefined)",
|
980
|
+
value: input.nullable
|
981
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
982
|
+
path: _path + ".title",
|
983
|
+
expected: "(string | undefined)",
|
984
|
+
value: input.title
|
985
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
986
|
+
path: _path + ".description",
|
987
|
+
expected: "(string | undefined)",
|
988
|
+
value: input.description
|
989
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
990
|
+
path: _path + ".deprecated",
|
991
|
+
expected: "(boolean | undefined)",
|
992
|
+
value: input.deprecated
|
993
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
994
|
+
path: _path + "[\"x-typia-optional\"]",
|
995
|
+
expected: "(boolean | undefined)",
|
996
|
+
value: input["x-typia-optional"]
|
997
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
998
|
+
path: _path + "[\"x-typia-rest\"]",
|
999
|
+
expected: "(boolean | undefined)",
|
1000
|
+
value: input["x-typia-rest"]
|
1001
|
+
}, errorFactory));
|
1002
|
+
const $ao21 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1003
|
+
const value = input[key];
|
1004
|
+
if (undefined === value)
|
1005
|
+
return true;
|
1006
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
1007
|
+
path: _path + $join(key),
|
1008
|
+
expected: "ISwaggerRouteRequestBody",
|
1009
|
+
value: value
|
1010
|
+
}, errorFactory)) && $ao22(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1011
|
+
path: _path + $join(key),
|
1012
|
+
expected: "ISwaggerRouteRequestBody",
|
1013
|
+
value: value
|
1014
|
+
}, errorFactory);
|
1015
|
+
});
|
1016
|
+
const $ao22 = (input, _path, _exceptionable = true) => (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1017
|
+
path: _path + ".description",
|
1018
|
+
expected: "(string | undefined)",
|
1019
|
+
value: input.description
|
1020
|
+
}, errorFactory)) && (undefined === input.required || "boolean" === typeof input.required || $guard(_exceptionable, {
|
1021
|
+
path: _path + ".required",
|
1022
|
+
expected: "(boolean | undefined)",
|
1023
|
+
value: input.required
|
1024
|
+
}, errorFactory)) && (undefined === input.content || ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) || $guard(_exceptionable, {
|
1025
|
+
path: _path + ".content",
|
1026
|
+
expected: "(ISwaggerRouteBodyContent | undefined)",
|
1027
|
+
value: input.content
|
1028
|
+
}, errorFactory)) && $ao23(input.content, _path + ".content", true && _exceptionable) || $guard(_exceptionable, {
|
1029
|
+
path: _path + ".content",
|
1030
|
+
expected: "(ISwaggerRouteBodyContent | undefined)",
|
1031
|
+
value: input.content
|
1032
|
+
}, errorFactory));
|
1033
|
+
const $ao23 = (input, _path, _exceptionable = true) => (undefined === input["text/plain"] || ("object" === typeof input["text/plain"] && null !== input["text/plain"] && false === Array.isArray(input["text/plain"]) || $guard(_exceptionable, {
|
1034
|
+
path: _path + "[\"text/plain\"]",
|
1035
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1036
|
+
value: input["text/plain"]
|
1037
|
+
}, errorFactory)) && $ao24(input["text/plain"], _path + "[\"text/plain\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1038
|
+
path: _path + "[\"text/plain\"]",
|
1039
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1040
|
+
value: input["text/plain"]
|
1041
|
+
}, errorFactory)) && (undefined === input["application/json"] || ("object" === typeof input["application/json"] && null !== input["application/json"] && false === Array.isArray(input["application/json"]) || $guard(_exceptionable, {
|
1042
|
+
path: _path + "[\"application/json\"]",
|
1043
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1044
|
+
value: input["application/json"]
|
1045
|
+
}, errorFactory)) && $ao24(input["application/json"], _path + "[\"application/json\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1046
|
+
path: _path + "[\"application/json\"]",
|
1047
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1048
|
+
value: input["application/json"]
|
1049
|
+
}, errorFactory)) && (undefined === input["application/x-www-form-urlencoded"] || ("object" === typeof input["application/x-www-form-urlencoded"] && null !== input["application/x-www-form-urlencoded"] && false === Array.isArray(input["application/x-www-form-urlencoded"]) || $guard(_exceptionable, {
|
1050
|
+
path: _path + "[\"application/x-www-form-urlencoded\"]",
|
1051
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1052
|
+
value: input["application/x-www-form-urlencoded"]
|
1053
|
+
}, errorFactory)) && $ao24(input["application/x-www-form-urlencoded"], _path + "[\"application/x-www-form-urlencoded\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1054
|
+
path: _path + "[\"application/x-www-form-urlencoded\"]",
|
1055
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1056
|
+
value: input["application/x-www-form-urlencoded"]
|
1057
|
+
}, errorFactory)) && (undefined === input["multipart/form-data"] || ("object" === typeof input["multipart/form-data"] && null !== input["multipart/form-data"] && false === Array.isArray(input["multipart/form-data"]) || $guard(_exceptionable, {
|
1058
|
+
path: _path + "[\"multipart/form-data\"]",
|
1059
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1060
|
+
value: input["multipart/form-data"]
|
1061
|
+
}, errorFactory)) && $ao24(input["multipart/form-data"], _path + "[\"multipart/form-data\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1062
|
+
path: _path + "[\"multipart/form-data\"]",
|
1063
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1064
|
+
value: input["multipart/form-data"]
|
1065
|
+
}, errorFactory)) && (undefined === input["*/*"] || ("object" === typeof input["*/*"] && null !== input["*/*"] && false === Array.isArray(input["*/*"]) || $guard(_exceptionable, {
|
1066
|
+
path: _path + "[\"*/*\"]",
|
1067
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1068
|
+
value: input["*/*"]
|
1069
|
+
}, errorFactory)) && $ao24(input["*/*"], _path + "[\"*/*\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1070
|
+
path: _path + "[\"*/*\"]",
|
1071
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1072
|
+
value: input["*/*"]
|
1073
|
+
}, errorFactory));
|
1074
|
+
const $ao24 = (input, _path, _exceptionable = true) => (undefined === input.schema || ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $guard(_exceptionable, {
|
1075
|
+
path: _path + ".schema",
|
1076
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | undefined)",
|
1077
|
+
value: input.schema
|
1078
|
+
}, errorFactory)) && $au0(input.schema, _path + ".schema", true && _exceptionable) || $guard(_exceptionable, {
|
1079
|
+
path: _path + ".schema",
|
1080
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | undefined)",
|
1081
|
+
value: input.schema
|
1082
|
+
}, errorFactory)) && (undefined === input["x-nestia-encrypted"] || "boolean" === typeof input["x-nestia-encrypted"] || $guard(_exceptionable, {
|
1083
|
+
path: _path + "[\"x-nestia-encrypted\"]",
|
1084
|
+
expected: "(boolean | undefined)",
|
1085
|
+
value: input["x-nestia-encrypted"]
|
1086
|
+
}, errorFactory));
|
1087
|
+
const $ao25 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1088
|
+
const value = input[key];
|
1089
|
+
if (undefined === value)
|
1090
|
+
return true;
|
1091
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
1092
|
+
path: _path + $join(key),
|
1093
|
+
expected: "ISwaggerRouteResponse",
|
1094
|
+
value: value
|
1095
|
+
}, errorFactory)) && $ao26(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1096
|
+
path: _path + $join(key),
|
1097
|
+
expected: "ISwaggerRouteResponse",
|
1098
|
+
value: value
|
1099
|
+
}, errorFactory);
|
1100
|
+
});
|
1101
|
+
const $ao26 = (input, _path, _exceptionable = true) => (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1102
|
+
path: _path + ".description",
|
1103
|
+
expected: "(string | undefined)",
|
1104
|
+
value: input.description
|
1105
|
+
}, errorFactory)) && (undefined === input.content || ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) || $guard(_exceptionable, {
|
1106
|
+
path: _path + ".content",
|
1107
|
+
expected: "(ISwaggerRouteBodyContent | undefined)",
|
1108
|
+
value: input.content
|
1109
|
+
}, errorFactory)) && $ao23(input.content, _path + ".content", true && _exceptionable) || $guard(_exceptionable, {
|
1110
|
+
path: _path + ".content",
|
1111
|
+
expected: "(ISwaggerRouteBodyContent | undefined)",
|
1112
|
+
value: input.content
|
1113
|
+
}, errorFactory));
|
1114
|
+
const $ao27 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1115
|
+
const value = input[key];
|
1116
|
+
if (undefined === value)
|
1117
|
+
return true;
|
1118
|
+
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
1119
|
+
path: _path + $join(key),
|
1120
|
+
expected: "(ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IOAuth2 | ISwaggerSecurityScheme.IOpenId)",
|
1121
|
+
value: value
|
1122
|
+
}, errorFactory)) && $au2(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1123
|
+
path: _path + $join(key),
|
1124
|
+
expected: "(ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IOAuth2 | ISwaggerSecurityScheme.IOpenId)",
|
1125
|
+
value: value
|
1126
|
+
}, errorFactory);
|
1127
|
+
});
|
1128
|
+
const $ao28 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
1129
|
+
path: _path + ".type",
|
1130
|
+
expected: "\"http\"",
|
1131
|
+
value: input.type
|
1132
|
+
}, errorFactory)) && ("basic" === input.scheme || $guard(_exceptionable, {
|
1133
|
+
path: _path + ".scheme",
|
1134
|
+
expected: "\"basic\"",
|
1135
|
+
value: input.scheme
|
1136
|
+
}, errorFactory));
|
1137
|
+
const $ao29 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
1138
|
+
path: _path + ".type",
|
1139
|
+
expected: "\"http\"",
|
1140
|
+
value: input.type
|
1141
|
+
}, errorFactory)) && ("bearer" === input.scheme || $guard(_exceptionable, {
|
1142
|
+
path: _path + ".scheme",
|
1143
|
+
expected: "\"bearer\"",
|
1144
|
+
value: input.scheme
|
1145
|
+
}, errorFactory)) && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat || $guard(_exceptionable, {
|
1146
|
+
path: _path + ".bearerFormat",
|
1147
|
+
expected: "(string | undefined)",
|
1148
|
+
value: input.bearerFormat
|
1149
|
+
}, errorFactory));
|
1150
|
+
const $ao30 = (input, _path, _exceptionable = true) => ("apiKey" === input.type || $guard(_exceptionable, {
|
1151
|
+
path: _path + ".type",
|
1152
|
+
expected: "\"apiKey\"",
|
1153
|
+
value: input.type
|
1154
|
+
}, errorFactory)) && (undefined === input["in"] || "cookie" === input["in"] || "header" === input["in"] || "query" === input["in"] || $guard(_exceptionable, {
|
1155
|
+
path: _path + "[\"in\"]",
|
1156
|
+
expected: "(\"cookie\" | \"header\" | \"query\" | undefined)",
|
1157
|
+
value: input["in"]
|
1158
|
+
}, errorFactory)) && (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
1159
|
+
path: _path + ".name",
|
1160
|
+
expected: "(string | undefined)",
|
1161
|
+
value: input.name
|
1162
|
+
}, errorFactory));
|
1163
|
+
const $ao31 = (input, _path, _exceptionable = true) => ("openIdConnect" === input.type || $guard(_exceptionable, {
|
1164
|
+
path: _path + ".type",
|
1165
|
+
expected: "\"openIdConnect\"",
|
1166
|
+
value: input.type
|
1167
|
+
}, errorFactory)) && ("string" === typeof input.openIdConnectUrl || $guard(_exceptionable, {
|
1168
|
+
path: _path + ".openIdConnectUrl",
|
1169
|
+
expected: "string",
|
1170
|
+
value: input.openIdConnectUrl
|
1171
|
+
}, errorFactory));
|
1172
|
+
const $ao32 = (input, _path, _exceptionable = true) => ("oauth2" === input.type || $guard(_exceptionable, {
|
1173
|
+
path: _path + ".type",
|
1174
|
+
expected: "\"oauth2\"",
|
1175
|
+
value: input.type
|
1176
|
+
}, errorFactory)) && (("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) || $guard(_exceptionable, {
|
1177
|
+
path: _path + ".flows",
|
1178
|
+
expected: "ISwaggerSecurityScheme.IOAuth2.IFlowSet",
|
1179
|
+
value: input.flows
|
1180
|
+
}, errorFactory)) && $ao33(input.flows, _path + ".flows", true && _exceptionable) || $guard(_exceptionable, {
|
1181
|
+
path: _path + ".flows",
|
1182
|
+
expected: "ISwaggerSecurityScheme.IOAuth2.IFlowSet",
|
1183
|
+
value: input.flows
|
1184
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1185
|
+
path: _path + ".description",
|
1186
|
+
expected: "(string | undefined)",
|
1187
|
+
value: input.description
|
1188
|
+
}, errorFactory));
|
1189
|
+
const $ao33 = (input, _path, _exceptionable = true) => (undefined === input.authorizationCode || ("object" === typeof input.authorizationCode && null !== input.authorizationCode || $guard(_exceptionable, {
|
1190
|
+
path: _path + ".authorizationCode",
|
1191
|
+
expected: "(ISwaggerSecurityScheme.IOAuth2.IFlow | undefined)",
|
1192
|
+
value: input.authorizationCode
|
1193
|
+
}, errorFactory)) && $ao34(input.authorizationCode, _path + ".authorizationCode", true && _exceptionable) || $guard(_exceptionable, {
|
1194
|
+
path: _path + ".authorizationCode",
|
1195
|
+
expected: "(ISwaggerSecurityScheme.IOAuth2.IFlow | undefined)",
|
1196
|
+
value: input.authorizationCode
|
1197
|
+
}, errorFactory)) && (undefined === input.implicit || ("object" === typeof input.implicit && null !== input.implicit || $guard(_exceptionable, {
|
1198
|
+
path: _path + ".implicit",
|
1199
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
1200
|
+
value: input.implicit
|
1201
|
+
}, errorFactory)) && $ao36(input.implicit, _path + ".implicit", true && _exceptionable) || $guard(_exceptionable, {
|
1202
|
+
path: _path + ".implicit",
|
1203
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
1204
|
+
value: input.implicit
|
1205
|
+
}, errorFactory)) && (undefined === input.password || ("object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) || $guard(_exceptionable, {
|
1206
|
+
path: _path + ".password",
|
1207
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1208
|
+
value: input.password
|
1209
|
+
}, errorFactory)) && $ao37(input.password, _path + ".password", true && _exceptionable) || $guard(_exceptionable, {
|
1210
|
+
path: _path + ".password",
|
1211
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1212
|
+
value: input.password
|
1213
|
+
}, errorFactory)) && (undefined === input.clientCredentials || ("object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) || $guard(_exceptionable, {
|
1214
|
+
path: _path + ".clientCredentials",
|
1215
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1216
|
+
value: input.clientCredentials
|
1217
|
+
}, errorFactory)) && $ao37(input.clientCredentials, _path + ".clientCredentials", true && _exceptionable) || $guard(_exceptionable, {
|
1218
|
+
path: _path + ".clientCredentials",
|
1219
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1220
|
+
value: input.clientCredentials
|
1221
|
+
}, errorFactory));
|
1222
|
+
const $ao34 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
1223
|
+
path: _path + ".authorizationUrl",
|
1224
|
+
expected: "string",
|
1225
|
+
value: input.authorizationUrl
|
1226
|
+
}, errorFactory)) && (undefined === input.tokenUrl || "string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
1227
|
+
path: _path + ".tokenUrl",
|
1228
|
+
expected: "(string | undefined)",
|
1229
|
+
value: input.tokenUrl
|
1230
|
+
}, errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
1231
|
+
path: _path + ".refreshUrl",
|
1232
|
+
expected: "(string | undefined)",
|
1233
|
+
value: input.refreshUrl
|
1234
|
+
}, errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
1235
|
+
path: _path + ".scopes",
|
1236
|
+
expected: "(Record<string, string> | undefined)",
|
1237
|
+
value: input.scopes
|
1238
|
+
}, errorFactory)) && $ao35(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
1239
|
+
path: _path + ".scopes",
|
1240
|
+
expected: "(Record<string, string> | undefined)",
|
1241
|
+
value: input.scopes
|
1242
|
+
}, errorFactory));
|
1243
|
+
const $ao35 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1244
|
+
const value = input[key];
|
1245
|
+
if (undefined === value)
|
1246
|
+
return true;
|
1247
|
+
return "string" === typeof value || $guard(_exceptionable, {
|
1248
|
+
path: _path + $join(key),
|
1249
|
+
expected: "string",
|
1250
|
+
value: value
|
1251
|
+
}, errorFactory);
|
1252
|
+
});
|
1253
|
+
const $ao36 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
1254
|
+
path: _path + ".authorizationUrl",
|
1255
|
+
expected: "string",
|
1256
|
+
value: input.authorizationUrl
|
1257
|
+
}, errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
1258
|
+
path: _path + ".refreshUrl",
|
1259
|
+
expected: "(string | undefined)",
|
1260
|
+
value: input.refreshUrl
|
1261
|
+
}, errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
1262
|
+
path: _path + ".scopes",
|
1263
|
+
expected: "(Record<string, string> | undefined)",
|
1264
|
+
value: input.scopes
|
1265
|
+
}, errorFactory)) && $ao35(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
1266
|
+
path: _path + ".scopes",
|
1267
|
+
expected: "(Record<string, string> | undefined)",
|
1268
|
+
value: input.scopes
|
1269
|
+
}, errorFactory));
|
1270
|
+
const $ao37 = (input, _path, _exceptionable = true) => (undefined === input.tokenUrl || "string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
1271
|
+
path: _path + ".tokenUrl",
|
1272
|
+
expected: "(string | undefined)",
|
1273
|
+
value: input.tokenUrl
|
1274
|
+
}, errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
1275
|
+
path: _path + ".refreshUrl",
|
1276
|
+
expected: "(string | undefined)",
|
1277
|
+
value: input.refreshUrl
|
1278
|
+
}, errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
1279
|
+
path: _path + ".scopes",
|
1280
|
+
expected: "(Record<string, string> | undefined)",
|
1281
|
+
value: input.scopes
|
1282
|
+
}, errorFactory)) && $ao35(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
1283
|
+
path: _path + ".scopes",
|
1284
|
+
expected: "(Record<string, string> | undefined)",
|
1285
|
+
value: input.scopes
|
1286
|
+
}, errorFactory));
|
1287
|
+
const $ao38 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1288
|
+
const value = input[key];
|
1289
|
+
if (undefined === value)
|
1290
|
+
return true;
|
1291
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
1292
|
+
path: _path + $join(key),
|
1293
|
+
expected: "ISwagger.IPath",
|
1294
|
+
value: value
|
1295
|
+
}, errorFactory)) && $ao39(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1296
|
+
path: _path + $join(key),
|
1297
|
+
expected: "ISwagger.IPath",
|
1298
|
+
value: value
|
1299
|
+
}, errorFactory);
|
1300
|
+
});
|
1301
|
+
const $ao39 = (input, _path, _exceptionable = true) => (undefined === input.get || ("object" === typeof input.get && null !== input.get && false === Array.isArray(input.get) || $guard(_exceptionable, {
|
1302
|
+
path: _path + ".get",
|
1303
|
+
expected: "(ISwaggerRoute | undefined)",
|
1304
|
+
value: input.get
|
1305
|
+
}, errorFactory)) && $ao40(input.get, _path + ".get", true && _exceptionable) || $guard(_exceptionable, {
|
1306
|
+
path: _path + ".get",
|
1307
|
+
expected: "(ISwaggerRoute | undefined)",
|
1308
|
+
value: input.get
|
1309
|
+
}, errorFactory)) && (undefined === input.post || ("object" === typeof input.post && null !== input.post && false === Array.isArray(input.post) || $guard(_exceptionable, {
|
1310
|
+
path: _path + ".post",
|
1311
|
+
expected: "(ISwaggerRoute | undefined)",
|
1312
|
+
value: input.post
|
1313
|
+
}, errorFactory)) && $ao40(input.post, _path + ".post", true && _exceptionable) || $guard(_exceptionable, {
|
1314
|
+
path: _path + ".post",
|
1315
|
+
expected: "(ISwaggerRoute | undefined)",
|
1316
|
+
value: input.post
|
1317
|
+
}, errorFactory)) && (undefined === input.patch || ("object" === typeof input.patch && null !== input.patch && false === Array.isArray(input.patch) || $guard(_exceptionable, {
|
1318
|
+
path: _path + ".patch",
|
1319
|
+
expected: "(ISwaggerRoute | undefined)",
|
1320
|
+
value: input.patch
|
1321
|
+
}, errorFactory)) && $ao40(input.patch, _path + ".patch", true && _exceptionable) || $guard(_exceptionable, {
|
1322
|
+
path: _path + ".patch",
|
1323
|
+
expected: "(ISwaggerRoute | undefined)",
|
1324
|
+
value: input.patch
|
1325
|
+
}, errorFactory)) && (undefined === input.put || ("object" === typeof input.put && null !== input.put && false === Array.isArray(input.put) || $guard(_exceptionable, {
|
1326
|
+
path: _path + ".put",
|
1327
|
+
expected: "(ISwaggerRoute | undefined)",
|
1328
|
+
value: input.put
|
1329
|
+
}, errorFactory)) && $ao40(input.put, _path + ".put", true && _exceptionable) || $guard(_exceptionable, {
|
1330
|
+
path: _path + ".put",
|
1331
|
+
expected: "(ISwaggerRoute | undefined)",
|
1332
|
+
value: input.put
|
1333
|
+
}, errorFactory)) && (undefined === input["delete"] || ("object" === typeof input["delete"] && null !== input["delete"] && false === Array.isArray(input["delete"]) || $guard(_exceptionable, {
|
1334
|
+
path: _path + "[\"delete\"]",
|
1335
|
+
expected: "(ISwaggerRoute | undefined)",
|
1336
|
+
value: input["delete"]
|
1337
|
+
}, errorFactory)) && $ao40(input["delete"], _path + "[\"delete\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1338
|
+
path: _path + "[\"delete\"]",
|
1339
|
+
expected: "(ISwaggerRoute | undefined)",
|
1340
|
+
value: input["delete"]
|
1341
|
+
}, errorFactory));
|
1342
|
+
const $ao40 = (input, _path, _exceptionable = true) => (undefined === input.parameters || (Array.isArray(input.parameters) || $guard(_exceptionable, {
|
1343
|
+
path: _path + ".parameters",
|
1344
|
+
expected: "(Array<ISwaggerRouteParameter | IReference> | undefined)",
|
1345
|
+
value: input.parameters
|
1346
|
+
}, errorFactory)) && input.parameters.every((elem, _index11) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
1347
|
+
path: _path + ".parameters[" + _index11 + "]",
|
1348
|
+
expected: "(ISwaggerRouteParameter | ISwaggerRouteParameter.IReference)",
|
1349
|
+
value: elem
|
1350
|
+
}, errorFactory)) && $au1(elem, _path + ".parameters[" + _index11 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1351
|
+
path: _path + ".parameters[" + _index11 + "]",
|
1352
|
+
expected: "(ISwaggerRouteParameter | ISwaggerRouteParameter.IReference)",
|
1353
|
+
value: elem
|
1354
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
1355
|
+
path: _path + ".parameters",
|
1356
|
+
expected: "(Array<ISwaggerRouteParameter | IReference> | undefined)",
|
1357
|
+
value: input.parameters
|
1358
|
+
}, errorFactory)) && (undefined === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody && false === Array.isArray(input.requestBody) || $guard(_exceptionable, {
|
1359
|
+
path: _path + ".requestBody",
|
1360
|
+
expected: "(ISwaggerRouteRequestBody | undefined)",
|
1361
|
+
value: input.requestBody
|
1362
|
+
}, errorFactory)) && $ao22(input.requestBody, _path + ".requestBody", true && _exceptionable) || $guard(_exceptionable, {
|
1363
|
+
path: _path + ".requestBody",
|
1364
|
+
expected: "(ISwaggerRouteRequestBody | undefined)",
|
1365
|
+
value: input.requestBody
|
1366
|
+
}, errorFactory)) && (undefined === input.responses || ("object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) || $guard(_exceptionable, {
|
1367
|
+
path: _path + ".responses",
|
1368
|
+
expected: "(Record<string, ISwaggerRouteResponse | IReference> | undefined)",
|
1369
|
+
value: input.responses
|
1370
|
+
}, errorFactory)) && $ao42(input.responses, _path + ".responses", true && _exceptionable) || $guard(_exceptionable, {
|
1371
|
+
path: _path + ".responses",
|
1372
|
+
expected: "(Record<string, ISwaggerRouteResponse | IReference> | undefined)",
|
1373
|
+
value: input.responses
|
1374
|
+
}, errorFactory)) && (undefined === input.summary || "string" === typeof input.summary || $guard(_exceptionable, {
|
1375
|
+
path: _path + ".summary",
|
1376
|
+
expected: "(string | undefined)",
|
1377
|
+
value: input.summary
|
1378
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1379
|
+
path: _path + ".description",
|
1380
|
+
expected: "(string | undefined)",
|
1381
|
+
value: input.description
|
1382
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
1383
|
+
path: _path + ".deprecated",
|
1384
|
+
expected: "(boolean | undefined)",
|
1385
|
+
value: input.deprecated
|
1386
|
+
}, errorFactory)) && (undefined === input.security || (Array.isArray(input.security) || $guard(_exceptionable, {
|
1387
|
+
path: _path + ".security",
|
1388
|
+
expected: "(Array<Record<string, Array<string>>> | undefined)",
|
1389
|
+
value: input.security
|
1390
|
+
}, errorFactory)) && input.security.every((elem, _index12) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
1391
|
+
path: _path + ".security[" + _index12 + "]",
|
1392
|
+
expected: "Record<string, Array<string>>",
|
1393
|
+
value: elem
|
1394
|
+
}, errorFactory)) && $ao44(elem, _path + ".security[" + _index12 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1395
|
+
path: _path + ".security[" + _index12 + "]",
|
1396
|
+
expected: "Record<string, Array<string>>",
|
1397
|
+
value: elem
|
1398
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
1399
|
+
path: _path + ".security",
|
1400
|
+
expected: "(Array<Record<string, Array<string>>> | undefined)",
|
1401
|
+
value: input.security
|
1402
|
+
}, errorFactory)) && (undefined === input.tags || (Array.isArray(input.tags) || $guard(_exceptionable, {
|
1403
|
+
path: _path + ".tags",
|
1404
|
+
expected: "(Array<string> | undefined)",
|
1405
|
+
value: input.tags
|
1406
|
+
}, errorFactory)) && input.tags.every((elem, _index13) => "string" === typeof elem || $guard(_exceptionable, {
|
1407
|
+
path: _path + ".tags[" + _index13 + "]",
|
1408
|
+
expected: "string",
|
1409
|
+
value: elem
|
1410
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
1411
|
+
path: _path + ".tags",
|
1412
|
+
expected: "(Array<string> | undefined)",
|
1413
|
+
value: input.tags
|
1414
|
+
}, errorFactory)) && (undefined === input["x-nestia-jsDocTags"] || (Array.isArray(input["x-nestia-jsDocTags"]) || $guard(_exceptionable, {
|
1415
|
+
path: _path + "[\"x-nestia-jsDocTags\"]",
|
1416
|
+
expected: "(Array<IJsDocTagInfo> | undefined)",
|
1417
|
+
value: input["x-nestia-jsDocTags"]
|
1418
|
+
}, errorFactory)) && input["x-nestia-jsDocTags"].every((elem, _index14) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
1419
|
+
path: _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]",
|
1420
|
+
expected: "IJsDocTagInfo",
|
1421
|
+
value: elem
|
1422
|
+
}, errorFactory)) && $ao45(elem, _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1423
|
+
path: _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]",
|
1424
|
+
expected: "IJsDocTagInfo",
|
1425
|
+
value: elem
|
1426
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
1427
|
+
path: _path + "[\"x-nestia-jsDocTags\"]",
|
1428
|
+
expected: "(Array<IJsDocTagInfo> | undefined)",
|
1429
|
+
value: input["x-nestia-jsDocTags"]
|
1430
|
+
}, errorFactory));
|
1431
|
+
const $ao41 = (input, _path, _exceptionable = true) => "string" === typeof input.$ref && RegExp(/^#\/components\/parameters\/(.*)/).test(input.$ref) || $guard(_exceptionable, {
|
1432
|
+
path: _path + ".$ref",
|
1433
|
+
expected: "`#/components/parameters/${string}`",
|
1434
|
+
value: input.$ref
|
1435
|
+
}, errorFactory);
|
1436
|
+
const $ao42 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1437
|
+
const value = input[key];
|
1438
|
+
if (undefined === value)
|
1439
|
+
return true;
|
1440
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
1441
|
+
path: _path + $join(key),
|
1442
|
+
expected: "(ISwaggerRouteResponse | ISwaggerRouteResponse.IReference)",
|
1443
|
+
value: value
|
1444
|
+
}, errorFactory)) && $au3(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1445
|
+
path: _path + $join(key),
|
1446
|
+
expected: "(ISwaggerRouteResponse | ISwaggerRouteResponse.IReference)",
|
1447
|
+
value: value
|
1448
|
+
}, errorFactory);
|
1449
|
+
});
|
1450
|
+
const $ao43 = (input, _path, _exceptionable = true) => "string" === typeof input.$ref && RegExp(/^#\/components\/responses\/(.*)/).test(input.$ref) || $guard(_exceptionable, {
|
1451
|
+
path: _path + ".$ref",
|
1452
|
+
expected: "`#/components/responses/${string}`",
|
1453
|
+
value: input.$ref
|
1454
|
+
}, errorFactory);
|
1455
|
+
const $ao44 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1456
|
+
const value = input[key];
|
1457
|
+
if (undefined === value)
|
1458
|
+
return true;
|
1459
|
+
return (Array.isArray(value) || $guard(_exceptionable, {
|
1460
|
+
path: _path + $join(key),
|
1461
|
+
expected: "Array<string>",
|
1462
|
+
value: value
|
1463
|
+
}, errorFactory)) && value.every((elem, _index15) => "string" === typeof elem || $guard(_exceptionable, {
|
1464
|
+
path: _path + $join(key) + "[" + _index15 + "]",
|
1465
|
+
expected: "string",
|
1466
|
+
value: elem
|
1467
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
1468
|
+
path: _path + $join(key),
|
1469
|
+
expected: "Array<string>",
|
1470
|
+
value: value
|
1471
|
+
}, errorFactory);
|
1472
|
+
});
|
1473
|
+
const $ao45 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
|
1474
|
+
path: _path + ".name",
|
1475
|
+
expected: "string",
|
1476
|
+
value: input.name
|
1477
|
+
}, errorFactory)) && (undefined === input.text || (Array.isArray(input.text) || $guard(_exceptionable, {
|
1478
|
+
path: _path + ".text",
|
1479
|
+
expected: "(Array<IJsDocTagInfo.IText> | undefined)",
|
1480
|
+
value: input.text
|
1481
|
+
}, errorFactory)) && input.text.every((elem, _index16) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
1482
|
+
path: _path + ".text[" + _index16 + "]",
|
1483
|
+
expected: "IJsDocTagInfo.IText",
|
1484
|
+
value: elem
|
1485
|
+
}, errorFactory)) && $ao46(elem, _path + ".text[" + _index16 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1486
|
+
path: _path + ".text[" + _index16 + "]",
|
1487
|
+
expected: "IJsDocTagInfo.IText",
|
1488
|
+
value: elem
|
1489
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
1490
|
+
path: _path + ".text",
|
1491
|
+
expected: "(Array<IJsDocTagInfo.IText> | undefined)",
|
1492
|
+
value: input.text
|
1493
|
+
}, errorFactory));
|
1494
|
+
const $ao46 = (input, _path, _exceptionable = true) => ("string" === typeof input.text || $guard(_exceptionable, {
|
1495
|
+
path: _path + ".text",
|
1496
|
+
expected: "string",
|
1497
|
+
value: input.text
|
1498
|
+
}, errorFactory)) && ("string" === typeof input.kind || $guard(_exceptionable, {
|
1499
|
+
path: _path + ".kind",
|
1500
|
+
expected: "string",
|
1501
|
+
value: input.kind
|
1502
|
+
}, errorFactory));
|
1503
|
+
const $au0 = (input, _path, _exceptionable = true) => (() => {
|
1504
|
+
if ("null" === input.type)
|
1505
|
+
return $ao9(input, _path, true && _exceptionable);
|
1506
|
+
else if (undefined !== input.anyOf)
|
1507
|
+
return $ao10(input, _path, true && _exceptionable);
|
1508
|
+
else if (undefined !== input.oneOf)
|
1509
|
+
return $ao11(input, _path, true && _exceptionable);
|
1510
|
+
else if ("boolean" === input.type)
|
1511
|
+
return $ao12(input, _path, true && _exceptionable);
|
1512
|
+
else if ("number" === input.type)
|
1513
|
+
return $ao14(input, _path, true && _exceptionable);
|
1514
|
+
else if ("integer" === input.type)
|
1515
|
+
return $ao13(input, _path, true && _exceptionable);
|
1516
|
+
else if ("string" === input.type)
|
1517
|
+
return $ao15(input, _path, true && _exceptionable);
|
1518
|
+
else if ("array" === input.type)
|
1519
|
+
return $ao16(input, _path, true && _exceptionable);
|
1520
|
+
else if ("object" === input.type)
|
1521
|
+
return $ao17(input, _path, true && _exceptionable);
|
1522
|
+
else if (undefined !== input.$ref)
|
1523
|
+
return $ao19(input, _path, true && _exceptionable);
|
1524
|
+
else
|
1525
|
+
return $ao8(input, _path, true && _exceptionable);
|
1526
|
+
})();
|
1527
|
+
const $au1 = (input, _path, _exceptionable = true) => (() => {
|
1528
|
+
if (undefined !== input["in"])
|
1529
|
+
return $ao7(input, _path, true && _exceptionable);
|
1530
|
+
else if (undefined !== input.$ref)
|
1531
|
+
return $ao41(input, _path, true && _exceptionable);
|
1532
|
+
else
|
1533
|
+
return $guard(_exceptionable, {
|
1534
|
+
path: _path,
|
1535
|
+
expected: "(ISwaggerRouteParameter | ISwaggerRouteParameter.IReference)",
|
1536
|
+
value: input
|
1537
|
+
}, errorFactory);
|
1538
|
+
})();
|
1539
|
+
const $au2 = (input, _path, _exceptionable = true) => (() => {
|
1540
|
+
if ("basic" === input.scheme)
|
1541
|
+
return $ao28(input, _path, true && _exceptionable);
|
1542
|
+
else if ("bearer" === input.scheme)
|
1543
|
+
return $ao29(input, _path, true && _exceptionable);
|
1544
|
+
else if ("apiKey" === input.type)
|
1545
|
+
return $ao30(input, _path, true && _exceptionable);
|
1546
|
+
else if ("openIdConnect" === input.type)
|
1547
|
+
return $ao31(input, _path, true && _exceptionable);
|
1548
|
+
else if ("oauth2" === input.type)
|
1549
|
+
return $ao32(input, _path, true && _exceptionable);
|
1550
|
+
else
|
1551
|
+
return $guard(_exceptionable, {
|
1552
|
+
path: _path,
|
1553
|
+
expected: "(ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IOpenId | ISwaggerSecurityScheme.IOAuth2)",
|
1554
|
+
value: input
|
1555
|
+
}, errorFactory);
|
1556
|
+
})();
|
1557
|
+
const $au3 = (input, _path, _exceptionable = true) => (() => {
|
1558
|
+
if (undefined !== input.$ref)
|
1559
|
+
return $ao43(input, _path, true && _exceptionable);
|
1560
|
+
else
|
1561
|
+
return $ao26(input, _path, true && _exceptionable);
|
1562
|
+
})();
|
1563
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
1564
|
+
path: _path + "",
|
1565
|
+
expected: "ISwagger",
|
1566
|
+
value: input
|
1567
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
1568
|
+
path: _path + "",
|
1569
|
+
expected: "ISwagger",
|
1570
|
+
value: input
|
1571
|
+
}, errorFactory);
|
1572
|
+
})(input, "$input", true);
|
1573
|
+
return input;
|
1574
|
+
})(output.openapi);
|
1575
|
+
});
|
1576
|
+
OpenApiConverter.v3_1 = (swagger) => {
|
1577
|
+
const converter = new openapi_down_convert_1.Converter(swagger);
|
1578
|
+
return ((input, errorFactory) => {
|
1579
|
+
const __is = input => {
|
1580
|
+
const $io0 = input => "string" === typeof input.openapi && RegExp(/^3\.0\.[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(input.openapi) && ("object" === typeof input.info && null !== input.info && $io1(input.info)) && (Array.isArray(input.servers) && input.servers.every(elem => "object" === typeof elem && null !== elem && $io4(elem))) && ("object" === typeof input.components && null !== input.components && false === Array.isArray(input.components) && $io5(input.components)) && ("object" === typeof input.paths && null !== input.paths && false === Array.isArray(input.paths) && $io38(input.paths)) && (undefined === input.security || Array.isArray(input.security) && input.security.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io44(elem)));
|
1581
|
+
const $io1 = input => "string" === typeof input.title && (undefined === input.description || "string" === typeof input.description) && (undefined === input.termsOfService || "string" === typeof input.termsOfService && (/\/|:/.test(input.termsOfService) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.termsOfService))) && (undefined === input.contact || "object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) && $io2(input.contact)) && (undefined === input.license || "object" === typeof input.license && null !== input.license && $io3(input.license)) && "string" === typeof input.version;
|
1582
|
+
const $io2 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.url || "string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url))) && (undefined === input.email || "string" === typeof input.email && /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(input.email));
|
1583
|
+
const $io3 = input => "string" === typeof input.name && (undefined === input.url || "string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url)));
|
1584
|
+
const $io4 = input => "string" === typeof input.url && (undefined === input.description || "string" === typeof input.description);
|
1585
|
+
const $io5 = input => (undefined === input.parameters || "object" === typeof input.parameters && null !== input.parameters && false === Array.isArray(input.parameters) && $io6(input.parameters)) && (undefined === input.requestBodies || "object" === typeof input.requestBodies && null !== input.requestBodies && false === Array.isArray(input.requestBodies) && $io21(input.requestBodies)) && (undefined === input.responses || "object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) && $io25(input.responses)) && (undefined === input.schemas || "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && $io18(input.schemas)) && (undefined === input.securitySchemes || "object" === typeof input.securitySchemes && null !== input.securitySchemes && false === Array.isArray(input.securitySchemes) && $io27(input.securitySchemes)) && (undefined === input["x-nestia-namespace"] || "string" === typeof input["x-nestia-namespace"]);
|
1586
|
+
const $io6 = input => Object.keys(input).every(key => {
|
1587
|
+
const value = input[key];
|
1588
|
+
if (undefined === value)
|
1589
|
+
return true;
|
1590
|
+
return "object" === typeof value && null !== value && $io7(value);
|
1591
|
+
});
|
1592
|
+
const $io7 = input => (undefined === input.name || "string" === typeof input.name) && ("cookie" === input["in"] || "header" === input["in"] || "path" === input["in"] || "query" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description);
|
1593
|
+
const $io8 = input => null !== input.type && undefined === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
1594
|
+
const $io9 = input => "null" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
1595
|
+
const $io10 = input => Array.isArray(input.anyOf) && input.anyOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $iu0(elem)) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
1596
|
+
const $io11 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $iu0(elem)) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
1597
|
+
const $io12 = input => (undefined === input["default"] || "boolean" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "boolean" === typeof elem)) && "boolean" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
1598
|
+
const $io13 = input => (undefined === input["default"] || "number" === typeof input["default"] && (Math.floor(input["default"]) === input["default"] && -2147483648 <= input["default"] && input["default"] <= 2147483647)) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "number" === typeof elem)) && (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -2147483648 <= input.minimum && input.minimum <= 2147483647)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -2147483648 <= input.maximum && input.maximum <= 2147483647)) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 4294967295)) && "integer" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
1599
|
+
const $io14 = input => (undefined === input["default"] || "number" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "number" === typeof elem)) && (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf) && "number" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
1600
|
+
const $io15 = input => (undefined === input["default"] || "string" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "string" === typeof elem)) && (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 4294967295)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 4294967295)) && "string" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
1601
|
+
const $io16 = input => "object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) && $iu0(input.items) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 4294967295)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 4294967295)) && (undefined === input["x-typia-tuple"] || "object" === typeof input["x-typia-tuple"] && null !== input["x-typia-tuple"] && $io20(input["x-typia-tuple"])) && "array" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
1602
|
+
const $io17 = input => (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io18(input.properties)) && (undefined === input.required || Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && (null !== input.additionalProperties && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) && $iu0(input.additionalProperties))) && (undefined === input["x-typia-patternProperties"] || "object" === typeof input["x-typia-patternProperties"] && null !== input["x-typia-patternProperties"] && false === Array.isArray(input["x-typia-patternProperties"]) && $io18(input["x-typia-patternProperties"])) && "object" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
1603
|
+
const $io18 = input => Object.keys(input).every(key => {
|
1604
|
+
const value = input[key];
|
1605
|
+
if (undefined === value)
|
1606
|
+
return true;
|
1607
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $iu0(value);
|
1608
|
+
});
|
1609
|
+
const $io19 = input => "string" === typeof input.$ref && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
1610
|
+
const $io20 = input => Array.isArray(input.items) && input.items.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $iu0(elem)) && "array" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
1611
|
+
const $io21 = input => Object.keys(input).every(key => {
|
1612
|
+
const value = input[key];
|
1613
|
+
if (undefined === value)
|
1614
|
+
return true;
|
1615
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io22(value);
|
1616
|
+
});
|
1617
|
+
const $io22 = input => (undefined === input.description || "string" === typeof input.description) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.content || "object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && $io23(input.content));
|
1618
|
+
const $io23 = input => (undefined === input["text/plain"] || "object" === typeof input["text/plain"] && null !== input["text/plain"] && false === Array.isArray(input["text/plain"]) && $io24(input["text/plain"])) && (undefined === input["application/json"] || "object" === typeof input["application/json"] && null !== input["application/json"] && false === Array.isArray(input["application/json"]) && $io24(input["application/json"])) && (undefined === input["application/x-www-form-urlencoded"] || "object" === typeof input["application/x-www-form-urlencoded"] && null !== input["application/x-www-form-urlencoded"] && false === Array.isArray(input["application/x-www-form-urlencoded"]) && $io24(input["application/x-www-form-urlencoded"])) && (undefined === input["multipart/form-data"] || "object" === typeof input["multipart/form-data"] && null !== input["multipart/form-data"] && false === Array.isArray(input["multipart/form-data"]) && $io24(input["multipart/form-data"])) && (undefined === input["*/*"] || "object" === typeof input["*/*"] && null !== input["*/*"] && false === Array.isArray(input["*/*"]) && $io24(input["*/*"]));
|
1619
|
+
const $io24 = input => (undefined === input.schema || "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema)) && (undefined === input["x-nestia-encrypted"] || "boolean" === typeof input["x-nestia-encrypted"]);
|
1620
|
+
const $io25 = input => Object.keys(input).every(key => {
|
1621
|
+
const value = input[key];
|
1622
|
+
if (undefined === value)
|
1623
|
+
return true;
|
1624
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io26(value);
|
1625
|
+
});
|
1626
|
+
const $io26 = input => (undefined === input.description || "string" === typeof input.description) && (undefined === input.content || "object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && $io23(input.content));
|
1627
|
+
const $io27 = input => Object.keys(input).every(key => {
|
1628
|
+
const value = input[key];
|
1629
|
+
if (undefined === value)
|
1630
|
+
return true;
|
1631
|
+
return "object" === typeof value && null !== value && $iu2(value);
|
1632
|
+
});
|
1633
|
+
const $io28 = input => "http" === input.type && "basic" === input.scheme;
|
1634
|
+
const $io29 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat);
|
1635
|
+
const $io30 = input => "apiKey" === input.type && (undefined === input["in"] || "cookie" === input["in"] || "header" === input["in"] || "query" === input["in"]) && (undefined === input.name || "string" === typeof input.name);
|
1636
|
+
const $io31 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl;
|
1637
|
+
const $io32 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && $io33(input.flows)) && (undefined === input.description || "string" === typeof input.description);
|
1638
|
+
const $io33 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && $io34(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && $io36(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) && $io37(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) && $io37(input.clientCredentials));
|
1639
|
+
const $io34 = input => "string" === typeof input.authorizationUrl && (undefined === input.tokenUrl || "string" === typeof input.tokenUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io35(input.scopes));
|
1640
|
+
const $io35 = input => Object.keys(input).every(key => {
|
1641
|
+
const value = input[key];
|
1642
|
+
if (undefined === value)
|
1643
|
+
return true;
|
1644
|
+
return "string" === typeof value;
|
1645
|
+
});
|
1646
|
+
const $io36 = input => "string" === typeof input.authorizationUrl && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io35(input.scopes));
|
1647
|
+
const $io37 = input => (undefined === input.tokenUrl || "string" === typeof input.tokenUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io35(input.scopes));
|
1648
|
+
const $io38 = input => Object.keys(input).every(key => {
|
1649
|
+
const value = input[key];
|
1650
|
+
if (undefined === value)
|
1651
|
+
return true;
|
1652
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io39(value);
|
1653
|
+
});
|
1654
|
+
const $io39 = input => (undefined === input.get || "object" === typeof input.get && null !== input.get && false === Array.isArray(input.get) && $io40(input.get)) && (undefined === input.post || "object" === typeof input.post && null !== input.post && false === Array.isArray(input.post) && $io40(input.post)) && (undefined === input.patch || "object" === typeof input.patch && null !== input.patch && false === Array.isArray(input.patch) && $io40(input.patch)) && (undefined === input.put || "object" === typeof input.put && null !== input.put && false === Array.isArray(input.put) && $io40(input.put)) && (undefined === input["delete"] || "object" === typeof input["delete"] && null !== input["delete"] && false === Array.isArray(input["delete"]) && $io40(input["delete"]));
|
1655
|
+
const $io40 = input => (undefined === input.parameters || Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && $iu1(elem))) && (undefined === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && false === Array.isArray(input.requestBody) && $io22(input.requestBody)) && (undefined === input.responses || "object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) && $io42(input.responses)) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input.security || Array.isArray(input.security) && input.security.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io44(elem))) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input["x-nestia-jsDocTags"] || Array.isArray(input["x-nestia-jsDocTags"]) && input["x-nestia-jsDocTags"].every(elem => "object" === typeof elem && null !== elem && $io45(elem)));
|
1656
|
+
const $io41 = input => "string" === typeof input.$ref && RegExp(/^#\/components\/parameters\/(.*)/).test(input.$ref);
|
1657
|
+
const $io42 = input => Object.keys(input).every(key => {
|
1658
|
+
const value = input[key];
|
1659
|
+
if (undefined === value)
|
1660
|
+
return true;
|
1661
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $iu3(value);
|
1662
|
+
});
|
1663
|
+
const $io43 = input => "string" === typeof input.$ref && RegExp(/^#\/components\/responses\/(.*)/).test(input.$ref);
|
1664
|
+
const $io44 = input => Object.keys(input).every(key => {
|
1665
|
+
const value = input[key];
|
1666
|
+
if (undefined === value)
|
1667
|
+
return true;
|
1668
|
+
return Array.isArray(value) && value.every(elem => "string" === typeof elem);
|
1669
|
+
});
|
1670
|
+
const $io45 = input => "string" === typeof input.name && (undefined === input.text || Array.isArray(input.text) && input.text.every(elem => "object" === typeof elem && null !== elem && $io46(elem)));
|
1671
|
+
const $io46 = input => "string" === typeof input.text && "string" === typeof input.kind;
|
1672
|
+
const $iu0 = input => (() => {
|
1673
|
+
if ("null" === input.type)
|
1674
|
+
return $io9(input);
|
1675
|
+
else if (undefined !== input.anyOf)
|
1676
|
+
return $io10(input);
|
1677
|
+
else if (undefined !== input.oneOf)
|
1678
|
+
return $io11(input);
|
1679
|
+
else if ("boolean" === input.type)
|
1680
|
+
return $io12(input);
|
1681
|
+
else if ("number" === input.type)
|
1682
|
+
return $io14(input);
|
1683
|
+
else if ("integer" === input.type)
|
1684
|
+
return $io13(input);
|
1685
|
+
else if ("string" === input.type)
|
1686
|
+
return $io15(input);
|
1687
|
+
else if ("array" === input.type)
|
1688
|
+
return $io16(input);
|
1689
|
+
else if ("object" === input.type)
|
1690
|
+
return $io17(input);
|
1691
|
+
else if (undefined !== input.$ref)
|
1692
|
+
return $io19(input);
|
1693
|
+
else
|
1694
|
+
return $io8(input);
|
1695
|
+
})();
|
1696
|
+
const $iu1 = input => (() => {
|
1697
|
+
if (undefined !== input["in"])
|
1698
|
+
return $io7(input);
|
1699
|
+
else if (undefined !== input.$ref)
|
1700
|
+
return $io41(input);
|
1701
|
+
else
|
1702
|
+
return false;
|
1703
|
+
})();
|
1704
|
+
const $iu2 = input => (() => {
|
1705
|
+
if ("basic" === input.scheme)
|
1706
|
+
return $io28(input);
|
1707
|
+
else if ("bearer" === input.scheme)
|
1708
|
+
return $io29(input);
|
1709
|
+
else if ("apiKey" === input.type)
|
1710
|
+
return $io30(input);
|
1711
|
+
else if ("openIdConnect" === input.type)
|
1712
|
+
return $io31(input);
|
1713
|
+
else if ("oauth2" === input.type)
|
1714
|
+
return $io32(input);
|
1715
|
+
else
|
1716
|
+
return false;
|
1717
|
+
})();
|
1718
|
+
const $iu3 = input => (() => {
|
1719
|
+
if (undefined !== input.$ref)
|
1720
|
+
return $io43(input);
|
1721
|
+
else
|
1722
|
+
return $io26(input);
|
1723
|
+
})();
|
1724
|
+
return "object" === typeof input && null !== input && $io0(input);
|
1725
|
+
};
|
1726
|
+
if (false === __is(input))
|
1727
|
+
((input, _path, _exceptionable = true) => {
|
1728
|
+
const $guard = typia_1.default.assert.guard;
|
1729
|
+
const $join = typia_1.default.assert.join;
|
1730
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.openapi && RegExp(/^3\.0\.[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(input.openapi) || $guard(_exceptionable, {
|
1731
|
+
path: _path + ".openapi",
|
1732
|
+
expected: "`3.0.${number}`",
|
1733
|
+
value: input.openapi
|
1734
|
+
}, errorFactory)) && (("object" === typeof input.info && null !== input.info || $guard(_exceptionable, {
|
1735
|
+
path: _path + ".info",
|
1736
|
+
expected: "ISwaggerInfo",
|
1737
|
+
value: input.info
|
1738
|
+
}, errorFactory)) && $ao1(input.info, _path + ".info", true && _exceptionable) || $guard(_exceptionable, {
|
1739
|
+
path: _path + ".info",
|
1740
|
+
expected: "ISwaggerInfo",
|
1741
|
+
value: input.info
|
1742
|
+
}, errorFactory)) && ((Array.isArray(input.servers) || $guard(_exceptionable, {
|
1743
|
+
path: _path + ".servers",
|
1744
|
+
expected: "Array<ISwagger.IServer>",
|
1745
|
+
value: input.servers
|
1746
|
+
}, errorFactory)) && input.servers.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
1747
|
+
path: _path + ".servers[" + _index1 + "]",
|
1748
|
+
expected: "ISwagger.IServer",
|
1749
|
+
value: elem
|
1750
|
+
}, errorFactory)) && $ao4(elem, _path + ".servers[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1751
|
+
path: _path + ".servers[" + _index1 + "]",
|
1752
|
+
expected: "ISwagger.IServer",
|
1753
|
+
value: elem
|
1754
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
1755
|
+
path: _path + ".servers",
|
1756
|
+
expected: "Array<ISwagger.IServer>",
|
1757
|
+
value: input.servers
|
1758
|
+
}, errorFactory)) && (("object" === typeof input.components && null !== input.components && false === Array.isArray(input.components) || $guard(_exceptionable, {
|
1759
|
+
path: _path + ".components",
|
1760
|
+
expected: "ISwaggerComponents",
|
1761
|
+
value: input.components
|
1762
|
+
}, errorFactory)) && $ao5(input.components, _path + ".components", true && _exceptionable) || $guard(_exceptionable, {
|
1763
|
+
path: _path + ".components",
|
1764
|
+
expected: "ISwaggerComponents",
|
1765
|
+
value: input.components
|
1766
|
+
}, errorFactory)) && (("object" === typeof input.paths && null !== input.paths && false === Array.isArray(input.paths) || $guard(_exceptionable, {
|
1767
|
+
path: _path + ".paths",
|
1768
|
+
expected: "Record<string, ISwagger.IPath>",
|
1769
|
+
value: input.paths
|
1770
|
+
}, errorFactory)) && $ao38(input.paths, _path + ".paths", true && _exceptionable) || $guard(_exceptionable, {
|
1771
|
+
path: _path + ".paths",
|
1772
|
+
expected: "Record<string, ISwagger.IPath>",
|
1773
|
+
value: input.paths
|
1774
|
+
}, errorFactory)) && (undefined === input.security || (Array.isArray(input.security) || $guard(_exceptionable, {
|
1775
|
+
path: _path + ".security",
|
1776
|
+
expected: "(Array<Record<string, Array<string>>> | undefined)",
|
1777
|
+
value: input.security
|
1778
|
+
}, errorFactory)) && input.security.every((elem, _index2) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
1779
|
+
path: _path + ".security[" + _index2 + "]",
|
1780
|
+
expected: "Record<string, Array<string>>",
|
1781
|
+
value: elem
|
1782
|
+
}, errorFactory)) && $ao44(elem, _path + ".security[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1783
|
+
path: _path + ".security[" + _index2 + "]",
|
1784
|
+
expected: "Record<string, Array<string>>",
|
1785
|
+
value: elem
|
1786
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
1787
|
+
path: _path + ".security",
|
1788
|
+
expected: "(Array<Record<string, Array<string>>> | undefined)",
|
1789
|
+
value: input.security
|
1790
|
+
}, errorFactory));
|
1791
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.title || $guard(_exceptionable, {
|
1792
|
+
path: _path + ".title",
|
1793
|
+
expected: "string",
|
1794
|
+
value: input.title
|
1795
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1796
|
+
path: _path + ".description",
|
1797
|
+
expected: "(string | undefined)",
|
1798
|
+
value: input.description
|
1799
|
+
}, errorFactory)) && (undefined === input.termsOfService || "string" === typeof input.termsOfService && (/\/|:/.test(input.termsOfService) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.termsOfService) || $guard(_exceptionable, {
|
1800
|
+
path: _path + ".termsOfService",
|
1801
|
+
expected: "string & Format<\"uri\">",
|
1802
|
+
value: input.termsOfService
|
1803
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
1804
|
+
path: _path + ".termsOfService",
|
1805
|
+
expected: "((string & Format<\"uri\">) | undefined)",
|
1806
|
+
value: input.termsOfService
|
1807
|
+
}, errorFactory)) && (undefined === input.contact || ("object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) || $guard(_exceptionable, {
|
1808
|
+
path: _path + ".contact",
|
1809
|
+
expected: "(ISwaggerInfo.IContact | undefined)",
|
1810
|
+
value: input.contact
|
1811
|
+
}, errorFactory)) && $ao2(input.contact, _path + ".contact", true && _exceptionable) || $guard(_exceptionable, {
|
1812
|
+
path: _path + ".contact",
|
1813
|
+
expected: "(ISwaggerInfo.IContact | undefined)",
|
1814
|
+
value: input.contact
|
1815
|
+
}, errorFactory)) && (undefined === input.license || ("object" === typeof input.license && null !== input.license || $guard(_exceptionable, {
|
1816
|
+
path: _path + ".license",
|
1817
|
+
expected: "(ISwaggerInfo.ILicense | undefined)",
|
1818
|
+
value: input.license
|
1819
|
+
}, errorFactory)) && $ao3(input.license, _path + ".license", true && _exceptionable) || $guard(_exceptionable, {
|
1820
|
+
path: _path + ".license",
|
1821
|
+
expected: "(ISwaggerInfo.ILicense | undefined)",
|
1822
|
+
value: input.license
|
1823
|
+
}, errorFactory)) && ("string" === typeof input.version || $guard(_exceptionable, {
|
1824
|
+
path: _path + ".version",
|
1825
|
+
expected: "string",
|
1826
|
+
value: input.version
|
1827
|
+
}, errorFactory));
|
1828
|
+
const $ao2 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
1829
|
+
path: _path + ".name",
|
1830
|
+
expected: "(string | undefined)",
|
1831
|
+
value: input.name
|
1832
|
+
}, errorFactory)) && (undefined === input.url || "string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url) || $guard(_exceptionable, {
|
1833
|
+
path: _path + ".url",
|
1834
|
+
expected: "string & Format<\"uri\">",
|
1835
|
+
value: input.url
|
1836
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
1837
|
+
path: _path + ".url",
|
1838
|
+
expected: "((string & Format<\"uri\">) | undefined)",
|
1839
|
+
value: input.url
|
1840
|
+
}, errorFactory)) && (undefined === input.email || "string" === typeof input.email && (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(input.email) || $guard(_exceptionable, {
|
1841
|
+
path: _path + ".email",
|
1842
|
+
expected: "string & Format<\"email\">",
|
1843
|
+
value: input.email
|
1844
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
1845
|
+
path: _path + ".email",
|
1846
|
+
expected: "((string & Format<\"email\">) | undefined)",
|
1847
|
+
value: input.email
|
1848
|
+
}, errorFactory));
|
1849
|
+
const $ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
|
1850
|
+
path: _path + ".name",
|
1851
|
+
expected: "string",
|
1852
|
+
value: input.name
|
1853
|
+
}, errorFactory)) && (undefined === input.url || "string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url) || $guard(_exceptionable, {
|
1854
|
+
path: _path + ".url",
|
1855
|
+
expected: "string & Format<\"uri\">",
|
1856
|
+
value: input.url
|
1857
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
1858
|
+
path: _path + ".url",
|
1859
|
+
expected: "((string & Format<\"uri\">) | undefined)",
|
1860
|
+
value: input.url
|
1861
|
+
}, errorFactory));
|
1862
|
+
const $ao4 = (input, _path, _exceptionable = true) => ("string" === typeof input.url || $guard(_exceptionable, {
|
1863
|
+
path: _path + ".url",
|
1864
|
+
expected: "string",
|
1865
|
+
value: input.url
|
1866
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1867
|
+
path: _path + ".description",
|
1868
|
+
expected: "(string | undefined)",
|
1869
|
+
value: input.description
|
1870
|
+
}, errorFactory));
|
1871
|
+
const $ao5 = (input, _path, _exceptionable = true) => (undefined === input.parameters || ("object" === typeof input.parameters && null !== input.parameters && false === Array.isArray(input.parameters) || $guard(_exceptionable, {
|
1872
|
+
path: _path + ".parameters",
|
1873
|
+
expected: "(Record<string, ISwaggerRouteParameter> | undefined)",
|
1874
|
+
value: input.parameters
|
1875
|
+
}, errorFactory)) && $ao6(input.parameters, _path + ".parameters", true && _exceptionable) || $guard(_exceptionable, {
|
1876
|
+
path: _path + ".parameters",
|
1877
|
+
expected: "(Record<string, ISwaggerRouteParameter> | undefined)",
|
1878
|
+
value: input.parameters
|
1879
|
+
}, errorFactory)) && (undefined === input.requestBodies || ("object" === typeof input.requestBodies && null !== input.requestBodies && false === Array.isArray(input.requestBodies) || $guard(_exceptionable, {
|
1880
|
+
path: _path + ".requestBodies",
|
1881
|
+
expected: "(Record<string, ISwaggerRouteRequestBody> | undefined)",
|
1882
|
+
value: input.requestBodies
|
1883
|
+
}, errorFactory)) && $ao21(input.requestBodies, _path + ".requestBodies", true && _exceptionable) || $guard(_exceptionable, {
|
1884
|
+
path: _path + ".requestBodies",
|
1885
|
+
expected: "(Record<string, ISwaggerRouteRequestBody> | undefined)",
|
1886
|
+
value: input.requestBodies
|
1887
|
+
}, errorFactory)) && (undefined === input.responses || ("object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) || $guard(_exceptionable, {
|
1888
|
+
path: _path + ".responses",
|
1889
|
+
expected: "(Record<string, ISwaggerRouteResponse> | undefined)",
|
1890
|
+
value: input.responses
|
1891
|
+
}, errorFactory)) && $ao25(input.responses, _path + ".responses", true && _exceptionable) || $guard(_exceptionable, {
|
1892
|
+
path: _path + ".responses",
|
1893
|
+
expected: "(Record<string, ISwaggerRouteResponse> | undefined)",
|
1894
|
+
value: input.responses
|
1895
|
+
}, errorFactory)) && (undefined === input.schemas || ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || $guard(_exceptionable, {
|
1896
|
+
path: _path + ".schemas",
|
1897
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
1898
|
+
value: input.schemas
|
1899
|
+
}, errorFactory)) && $ao18(input.schemas, _path + ".schemas", true && _exceptionable) || $guard(_exceptionable, {
|
1900
|
+
path: _path + ".schemas",
|
1901
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
1902
|
+
value: input.schemas
|
1903
|
+
}, errorFactory)) && (undefined === input.securitySchemes || ("object" === typeof input.securitySchemes && null !== input.securitySchemes && false === Array.isArray(input.securitySchemes) || $guard(_exceptionable, {
|
1904
|
+
path: _path + ".securitySchemes",
|
1905
|
+
expected: "(Record<string, ISwaggerSecurityScheme> | undefined)",
|
1906
|
+
value: input.securitySchemes
|
1907
|
+
}, errorFactory)) && $ao27(input.securitySchemes, _path + ".securitySchemes", true && _exceptionable) || $guard(_exceptionable, {
|
1908
|
+
path: _path + ".securitySchemes",
|
1909
|
+
expected: "(Record<string, ISwaggerSecurityScheme> | undefined)",
|
1910
|
+
value: input.securitySchemes
|
1911
|
+
}, errorFactory)) && (undefined === input["x-nestia-namespace"] || "string" === typeof input["x-nestia-namespace"] || $guard(_exceptionable, {
|
1912
|
+
path: _path + "[\"x-nestia-namespace\"]",
|
1913
|
+
expected: "(string | undefined)",
|
1914
|
+
value: input["x-nestia-namespace"]
|
1915
|
+
}, errorFactory));
|
1916
|
+
const $ao6 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1917
|
+
const value = input[key];
|
1918
|
+
if (undefined === value)
|
1919
|
+
return true;
|
1920
|
+
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
1921
|
+
path: _path + $join(key),
|
1922
|
+
expected: "ISwaggerRouteParameter",
|
1923
|
+
value: value
|
1924
|
+
}, errorFactory)) && $ao7(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1925
|
+
path: _path + $join(key),
|
1926
|
+
expected: "ISwaggerRouteParameter",
|
1927
|
+
value: value
|
1928
|
+
}, errorFactory);
|
1929
|
+
});
|
1930
|
+
const $ao7 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
1931
|
+
path: _path + ".name",
|
1932
|
+
expected: "(string | undefined)",
|
1933
|
+
value: input.name
|
1934
|
+
}, errorFactory)) && ("cookie" === input["in"] || "header" === input["in"] || "path" === input["in"] || "query" === input["in"] || $guard(_exceptionable, {
|
1935
|
+
path: _path + "[\"in\"]",
|
1936
|
+
expected: "(\"cookie\" | \"header\" | \"path\" | \"query\")",
|
1937
|
+
value: input["in"]
|
1938
|
+
}, errorFactory)) && (("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $guard(_exceptionable, {
|
1939
|
+
path: _path + ".schema",
|
1940
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1941
|
+
value: input.schema
|
1942
|
+
}, errorFactory)) && $au0(input.schema, _path + ".schema", true && _exceptionable) || $guard(_exceptionable, {
|
1943
|
+
path: _path + ".schema",
|
1944
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1945
|
+
value: input.schema
|
1946
|
+
}, errorFactory)) && (undefined === input.required || "boolean" === typeof input.required || $guard(_exceptionable, {
|
1947
|
+
path: _path + ".required",
|
1948
|
+
expected: "(boolean | undefined)",
|
1949
|
+
value: input.required
|
1950
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1951
|
+
path: _path + ".description",
|
1952
|
+
expected: "(string | undefined)",
|
1953
|
+
value: input.description
|
1954
|
+
}, errorFactory));
|
1955
|
+
const $ao8 = (input, _path, _exceptionable = true) => (null !== input.type || $guard(_exceptionable, {
|
1956
|
+
path: _path + ".type",
|
1957
|
+
expected: "undefined",
|
1958
|
+
value: input.type
|
1959
|
+
}, errorFactory)) && (undefined === input.type || $guard(_exceptionable, {
|
1960
|
+
path: _path + ".type",
|
1961
|
+
expected: "undefined",
|
1962
|
+
value: input.type
|
1963
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
1964
|
+
path: _path + ".title",
|
1965
|
+
expected: "(string | undefined)",
|
1966
|
+
value: input.title
|
1967
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1968
|
+
path: _path + ".description",
|
1969
|
+
expected: "(string | undefined)",
|
1970
|
+
value: input.description
|
1971
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
1972
|
+
path: _path + ".deprecated",
|
1973
|
+
expected: "(boolean | undefined)",
|
1974
|
+
value: input.deprecated
|
1975
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
1976
|
+
path: _path + "[\"x-typia-optional\"]",
|
1977
|
+
expected: "(boolean | undefined)",
|
1978
|
+
value: input["x-typia-optional"]
|
1979
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
1980
|
+
path: _path + "[\"x-typia-rest\"]",
|
1981
|
+
expected: "(boolean | undefined)",
|
1982
|
+
value: input["x-typia-rest"]
|
1983
|
+
}, errorFactory));
|
1984
|
+
const $ao9 = (input, _path, _exceptionable = true) => ("null" === input.type || $guard(_exceptionable, {
|
1985
|
+
path: _path + ".type",
|
1986
|
+
expected: "\"null\"",
|
1987
|
+
value: input.type
|
1988
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
1989
|
+
path: _path + ".title",
|
1990
|
+
expected: "(string | undefined)",
|
1991
|
+
value: input.title
|
1992
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1993
|
+
path: _path + ".description",
|
1994
|
+
expected: "(string | undefined)",
|
1995
|
+
value: input.description
|
1996
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
1997
|
+
path: _path + ".deprecated",
|
1998
|
+
expected: "(boolean | undefined)",
|
1999
|
+
value: input.deprecated
|
2000
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
2001
|
+
path: _path + "[\"x-typia-optional\"]",
|
2002
|
+
expected: "(boolean | undefined)",
|
2003
|
+
value: input["x-typia-optional"]
|
2004
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
2005
|
+
path: _path + "[\"x-typia-rest\"]",
|
2006
|
+
expected: "(boolean | undefined)",
|
2007
|
+
value: input["x-typia-rest"]
|
2008
|
+
}, errorFactory));
|
2009
|
+
const $ao10 = (input, _path, _exceptionable = true) => ((Array.isArray(input.anyOf) || $guard(_exceptionable, {
|
2010
|
+
path: _path + ".anyOf",
|
2011
|
+
expected: "Array<ISwaggerSchema>",
|
2012
|
+
value: input.anyOf
|
2013
|
+
}, errorFactory)) && input.anyOf.every((elem, _index3) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
2014
|
+
path: _path + ".anyOf[" + _index3 + "]",
|
2015
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
2016
|
+
value: elem
|
2017
|
+
}, errorFactory)) && $au0(elem, _path + ".anyOf[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
2018
|
+
path: _path + ".anyOf[" + _index3 + "]",
|
2019
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
2020
|
+
value: elem
|
2021
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2022
|
+
path: _path + ".anyOf",
|
2023
|
+
expected: "Array<ISwaggerSchema>",
|
2024
|
+
value: input.anyOf
|
2025
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
2026
|
+
path: _path + ".title",
|
2027
|
+
expected: "(string | undefined)",
|
2028
|
+
value: input.title
|
2029
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
2030
|
+
path: _path + ".description",
|
2031
|
+
expected: "(string | undefined)",
|
2032
|
+
value: input.description
|
2033
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
2034
|
+
path: _path + ".deprecated",
|
2035
|
+
expected: "(boolean | undefined)",
|
2036
|
+
value: input.deprecated
|
2037
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
2038
|
+
path: _path + "[\"x-typia-optional\"]",
|
2039
|
+
expected: "(boolean | undefined)",
|
2040
|
+
value: input["x-typia-optional"]
|
2041
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
2042
|
+
path: _path + "[\"x-typia-rest\"]",
|
2043
|
+
expected: "(boolean | undefined)",
|
2044
|
+
value: input["x-typia-rest"]
|
2045
|
+
}, errorFactory));
|
2046
|
+
const $ao11 = (input, _path, _exceptionable = true) => ((Array.isArray(input.oneOf) || $guard(_exceptionable, {
|
2047
|
+
path: _path + ".oneOf",
|
2048
|
+
expected: "Array<ISwaggerSchema>",
|
2049
|
+
value: input.oneOf
|
2050
|
+
}, errorFactory)) && input.oneOf.every((elem, _index4) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
2051
|
+
path: _path + ".oneOf[" + _index4 + "]",
|
2052
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
2053
|
+
value: elem
|
2054
|
+
}, errorFactory)) && $au0(elem, _path + ".oneOf[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
2055
|
+
path: _path + ".oneOf[" + _index4 + "]",
|
2056
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
2057
|
+
value: elem
|
2058
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2059
|
+
path: _path + ".oneOf",
|
2060
|
+
expected: "Array<ISwaggerSchema>",
|
2061
|
+
value: input.oneOf
|
2062
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
2063
|
+
path: _path + ".title",
|
2064
|
+
expected: "(string | undefined)",
|
2065
|
+
value: input.title
|
2066
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
2067
|
+
path: _path + ".description",
|
2068
|
+
expected: "(string | undefined)",
|
2069
|
+
value: input.description
|
2070
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
2071
|
+
path: _path + ".deprecated",
|
2072
|
+
expected: "(boolean | undefined)",
|
2073
|
+
value: input.deprecated
|
2074
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
2075
|
+
path: _path + "[\"x-typia-optional\"]",
|
2076
|
+
expected: "(boolean | undefined)",
|
2077
|
+
value: input["x-typia-optional"]
|
2078
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
2079
|
+
path: _path + "[\"x-typia-rest\"]",
|
2080
|
+
expected: "(boolean | undefined)",
|
2081
|
+
value: input["x-typia-rest"]
|
2082
|
+
}, errorFactory));
|
2083
|
+
const $ao12 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "boolean" === typeof input["default"] || $guard(_exceptionable, {
|
2084
|
+
path: _path + "[\"default\"]",
|
2085
|
+
expected: "(boolean | undefined)",
|
2086
|
+
value: input["default"]
|
2087
|
+
}, errorFactory)) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
2088
|
+
path: _path + "[\"enum\"]",
|
2089
|
+
expected: "(Array<boolean> | undefined)",
|
2090
|
+
value: input["enum"]
|
2091
|
+
}, errorFactory)) && input["enum"].every((elem, _index5) => "boolean" === typeof elem || $guard(_exceptionable, {
|
2092
|
+
path: _path + "[\"enum\"][" + _index5 + "]",
|
2093
|
+
expected: "boolean",
|
2094
|
+
value: elem
|
2095
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2096
|
+
path: _path + "[\"enum\"]",
|
2097
|
+
expected: "(Array<boolean> | undefined)",
|
2098
|
+
value: input["enum"]
|
2099
|
+
}, errorFactory)) && ("boolean" === input.type || $guard(_exceptionable, {
|
2100
|
+
path: _path + ".type",
|
2101
|
+
expected: "\"boolean\"",
|
2102
|
+
value: input.type
|
2103
|
+
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
2104
|
+
path: _path + ".nullable",
|
2105
|
+
expected: "(boolean | undefined)",
|
2106
|
+
value: input.nullable
|
2107
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
2108
|
+
path: _path + ".title",
|
2109
|
+
expected: "(string | undefined)",
|
2110
|
+
value: input.title
|
2111
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
2112
|
+
path: _path + ".description",
|
2113
|
+
expected: "(string | undefined)",
|
2114
|
+
value: input.description
|
2115
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
2116
|
+
path: _path + ".deprecated",
|
2117
|
+
expected: "(boolean | undefined)",
|
2118
|
+
value: input.deprecated
|
2119
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
2120
|
+
path: _path + "[\"x-typia-optional\"]",
|
2121
|
+
expected: "(boolean | undefined)",
|
2122
|
+
value: input["x-typia-optional"]
|
2123
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
2124
|
+
path: _path + "[\"x-typia-rest\"]",
|
2125
|
+
expected: "(boolean | undefined)",
|
2126
|
+
value: input["x-typia-rest"]
|
2127
|
+
}, errorFactory));
|
2128
|
+
const $ao13 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "number" === typeof input["default"] && (Math.floor(input["default"]) === input["default"] && -2147483648 <= input["default"] && input["default"] <= 2147483647 || $guard(_exceptionable, {
|
2129
|
+
path: _path + "[\"default\"]",
|
2130
|
+
expected: "number & Type<\"int32\">",
|
2131
|
+
value: input["default"]
|
2132
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2133
|
+
path: _path + "[\"default\"]",
|
2134
|
+
expected: "((number & Type<\"int32\">) | undefined)",
|
2135
|
+
value: input["default"]
|
2136
|
+
}, errorFactory)) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
2137
|
+
path: _path + "[\"enum\"]",
|
2138
|
+
expected: "(Array<number> | undefined)",
|
2139
|
+
value: input["enum"]
|
2140
|
+
}, errorFactory)) && input["enum"].every((elem, _index6) => "number" === typeof elem || $guard(_exceptionable, {
|
2141
|
+
path: _path + "[\"enum\"][" + _index6 + "]",
|
2142
|
+
expected: "number",
|
2143
|
+
value: elem
|
2144
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2145
|
+
path: _path + "[\"enum\"]",
|
2146
|
+
expected: "(Array<number> | undefined)",
|
2147
|
+
value: input["enum"]
|
2148
|
+
}, errorFactory)) && (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -2147483648 <= input.minimum && input.minimum <= 2147483647 || $guard(_exceptionable, {
|
2149
|
+
path: _path + ".minimum",
|
2150
|
+
expected: "number & Type<\"int32\">",
|
2151
|
+
value: input.minimum
|
2152
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2153
|
+
path: _path + ".minimum",
|
2154
|
+
expected: "((number & Type<\"int32\">) | undefined)",
|
2155
|
+
value: input.minimum
|
2156
|
+
}, errorFactory)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -2147483648 <= input.maximum && input.maximum <= 2147483647 || $guard(_exceptionable, {
|
2157
|
+
path: _path + ".maximum",
|
2158
|
+
expected: "number & Type<\"int32\">",
|
2159
|
+
value: input.maximum
|
2160
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2161
|
+
path: _path + ".maximum",
|
2162
|
+
expected: "((number & Type<\"int32\">) | undefined)",
|
2163
|
+
value: input.maximum
|
2164
|
+
}, errorFactory)) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || $guard(_exceptionable, {
|
2165
|
+
path: _path + ".exclusiveMinimum",
|
2166
|
+
expected: "(boolean | undefined)",
|
2167
|
+
value: input.exclusiveMinimum
|
2168
|
+
}, errorFactory)) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || $guard(_exceptionable, {
|
2169
|
+
path: _path + ".exclusiveMaximum",
|
2170
|
+
expected: "(boolean | undefined)",
|
2171
|
+
value: input.exclusiveMaximum
|
2172
|
+
}, errorFactory)) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 4294967295 || $guard(_exceptionable, {
|
2173
|
+
path: _path + ".multipleOf",
|
2174
|
+
expected: "number & Type<\"uint32\">",
|
2175
|
+
value: input.multipleOf
|
2176
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2177
|
+
path: _path + ".multipleOf",
|
2178
|
+
expected: "((number & Type<\"uint32\">) | undefined)",
|
2179
|
+
value: input.multipleOf
|
2180
|
+
}, errorFactory)) && ("integer" === input.type || $guard(_exceptionable, {
|
2181
|
+
path: _path + ".type",
|
2182
|
+
expected: "\"integer\"",
|
2183
|
+
value: input.type
|
2184
|
+
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
2185
|
+
path: _path + ".nullable",
|
2186
|
+
expected: "(boolean | undefined)",
|
2187
|
+
value: input.nullable
|
2188
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
2189
|
+
path: _path + ".title",
|
2190
|
+
expected: "(string | undefined)",
|
2191
|
+
value: input.title
|
2192
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
2193
|
+
path: _path + ".description",
|
2194
|
+
expected: "(string | undefined)",
|
2195
|
+
value: input.description
|
2196
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
2197
|
+
path: _path + ".deprecated",
|
2198
|
+
expected: "(boolean | undefined)",
|
2199
|
+
value: input.deprecated
|
2200
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
2201
|
+
path: _path + "[\"x-typia-optional\"]",
|
2202
|
+
expected: "(boolean | undefined)",
|
2203
|
+
value: input["x-typia-optional"]
|
2204
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
2205
|
+
path: _path + "[\"x-typia-rest\"]",
|
2206
|
+
expected: "(boolean | undefined)",
|
2207
|
+
value: input["x-typia-rest"]
|
2208
|
+
}, errorFactory));
|
2209
|
+
const $ao14 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "number" === typeof input["default"] || $guard(_exceptionable, {
|
2210
|
+
path: _path + "[\"default\"]",
|
2211
|
+
expected: "(number | undefined)",
|
2212
|
+
value: input["default"]
|
2213
|
+
}, errorFactory)) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
2214
|
+
path: _path + "[\"enum\"]",
|
2215
|
+
expected: "(Array<number> | undefined)",
|
2216
|
+
value: input["enum"]
|
2217
|
+
}, errorFactory)) && input["enum"].every((elem, _index7) => "number" === typeof elem || $guard(_exceptionable, {
|
2218
|
+
path: _path + "[\"enum\"][" + _index7 + "]",
|
2219
|
+
expected: "number",
|
2220
|
+
value: elem
|
2221
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2222
|
+
path: _path + "[\"enum\"]",
|
2223
|
+
expected: "(Array<number> | undefined)",
|
2224
|
+
value: input["enum"]
|
2225
|
+
}, errorFactory)) && (undefined === input.minimum || "number" === typeof input.minimum || $guard(_exceptionable, {
|
2226
|
+
path: _path + ".minimum",
|
2227
|
+
expected: "(number | undefined)",
|
2228
|
+
value: input.minimum
|
2229
|
+
}, errorFactory)) && (undefined === input.maximum || "number" === typeof input.maximum || $guard(_exceptionable, {
|
2230
|
+
path: _path + ".maximum",
|
2231
|
+
expected: "(number | undefined)",
|
2232
|
+
value: input.maximum
|
2233
|
+
}, errorFactory)) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || $guard(_exceptionable, {
|
2234
|
+
path: _path + ".exclusiveMinimum",
|
2235
|
+
expected: "(boolean | undefined)",
|
2236
|
+
value: input.exclusiveMinimum
|
2237
|
+
}, errorFactory)) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || $guard(_exceptionable, {
|
2238
|
+
path: _path + ".exclusiveMaximum",
|
2239
|
+
expected: "(boolean | undefined)",
|
2240
|
+
value: input.exclusiveMaximum
|
2241
|
+
}, errorFactory)) && (undefined === input.multipleOf || "number" === typeof input.multipleOf || $guard(_exceptionable, {
|
2242
|
+
path: _path + ".multipleOf",
|
2243
|
+
expected: "(number | undefined)",
|
2244
|
+
value: input.multipleOf
|
2245
|
+
}, errorFactory)) && ("number" === input.type || $guard(_exceptionable, {
|
2246
|
+
path: _path + ".type",
|
2247
|
+
expected: "\"number\"",
|
2248
|
+
value: input.type
|
2249
|
+
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
2250
|
+
path: _path + ".nullable",
|
2251
|
+
expected: "(boolean | undefined)",
|
2252
|
+
value: input.nullable
|
2253
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
2254
|
+
path: _path + ".title",
|
2255
|
+
expected: "(string | undefined)",
|
2256
|
+
value: input.title
|
2257
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
2258
|
+
path: _path + ".description",
|
2259
|
+
expected: "(string | undefined)",
|
2260
|
+
value: input.description
|
2261
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
2262
|
+
path: _path + ".deprecated",
|
2263
|
+
expected: "(boolean | undefined)",
|
2264
|
+
value: input.deprecated
|
2265
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
2266
|
+
path: _path + "[\"x-typia-optional\"]",
|
2267
|
+
expected: "(boolean | undefined)",
|
2268
|
+
value: input["x-typia-optional"]
|
2269
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
2270
|
+
path: _path + "[\"x-typia-rest\"]",
|
2271
|
+
expected: "(boolean | undefined)",
|
2272
|
+
value: input["x-typia-rest"]
|
2273
|
+
}, errorFactory));
|
2274
|
+
const $ao15 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "string" === typeof input["default"] || $guard(_exceptionable, {
|
2275
|
+
path: _path + "[\"default\"]",
|
2276
|
+
expected: "(string | undefined)",
|
2277
|
+
value: input["default"]
|
2278
|
+
}, errorFactory)) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
2279
|
+
path: _path + "[\"enum\"]",
|
2280
|
+
expected: "(Array<string> | undefined)",
|
2281
|
+
value: input["enum"]
|
2282
|
+
}, errorFactory)) && input["enum"].every((elem, _index8) => "string" === typeof elem || $guard(_exceptionable, {
|
2283
|
+
path: _path + "[\"enum\"][" + _index8 + "]",
|
2284
|
+
expected: "string",
|
2285
|
+
value: elem
|
2286
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2287
|
+
path: _path + "[\"enum\"]",
|
2288
|
+
expected: "(Array<string> | undefined)",
|
2289
|
+
value: input["enum"]
|
2290
|
+
}, errorFactory)) && (undefined === input.format || "string" === typeof input.format || $guard(_exceptionable, {
|
2291
|
+
path: _path + ".format",
|
2292
|
+
expected: "(string | undefined)",
|
2293
|
+
value: input.format
|
2294
|
+
}, errorFactory)) && (undefined === input.pattern || "string" === typeof input.pattern || $guard(_exceptionable, {
|
2295
|
+
path: _path + ".pattern",
|
2296
|
+
expected: "(string | undefined)",
|
2297
|
+
value: input.pattern
|
2298
|
+
}, errorFactory)) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 4294967295 || $guard(_exceptionable, {
|
2299
|
+
path: _path + ".minLength",
|
2300
|
+
expected: "number & Type<\"uint32\">",
|
2301
|
+
value: input.minLength
|
2302
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2303
|
+
path: _path + ".minLength",
|
2304
|
+
expected: "((number & Type<\"uint32\">) | undefined)",
|
2305
|
+
value: input.minLength
|
2306
|
+
}, errorFactory)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 4294967295 || $guard(_exceptionable, {
|
2307
|
+
path: _path + ".maxLength",
|
2308
|
+
expected: "number & Type<\"uint32\">",
|
2309
|
+
value: input.maxLength
|
2310
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2311
|
+
path: _path + ".maxLength",
|
2312
|
+
expected: "((number & Type<\"uint32\">) | undefined)",
|
2313
|
+
value: input.maxLength
|
2314
|
+
}, errorFactory)) && ("string" === input.type || $guard(_exceptionable, {
|
2315
|
+
path: _path + ".type",
|
2316
|
+
expected: "\"string\"",
|
2317
|
+
value: input.type
|
2318
|
+
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
2319
|
+
path: _path + ".nullable",
|
2320
|
+
expected: "(boolean | undefined)",
|
2321
|
+
value: input.nullable
|
2322
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
2323
|
+
path: _path + ".title",
|
2324
|
+
expected: "(string | undefined)",
|
2325
|
+
value: input.title
|
2326
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
2327
|
+
path: _path + ".description",
|
2328
|
+
expected: "(string | undefined)",
|
2329
|
+
value: input.description
|
2330
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
2331
|
+
path: _path + ".deprecated",
|
2332
|
+
expected: "(boolean | undefined)",
|
2333
|
+
value: input.deprecated
|
2334
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
2335
|
+
path: _path + "[\"x-typia-optional\"]",
|
2336
|
+
expected: "(boolean | undefined)",
|
2337
|
+
value: input["x-typia-optional"]
|
2338
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
2339
|
+
path: _path + "[\"x-typia-rest\"]",
|
2340
|
+
expected: "(boolean | undefined)",
|
2341
|
+
value: input["x-typia-rest"]
|
2342
|
+
}, errorFactory));
|
2343
|
+
const $ao16 = (input, _path, _exceptionable = true) => (("object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) || $guard(_exceptionable, {
|
2344
|
+
path: _path + ".items",
|
2345
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
2346
|
+
value: input.items
|
2347
|
+
}, errorFactory)) && $au0(input.items, _path + ".items", true && _exceptionable) || $guard(_exceptionable, {
|
2348
|
+
path: _path + ".items",
|
2349
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
2350
|
+
value: input.items
|
2351
|
+
}, errorFactory)) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 4294967295 || $guard(_exceptionable, {
|
2352
|
+
path: _path + ".minItems",
|
2353
|
+
expected: "number & Type<\"uint32\">",
|
2354
|
+
value: input.minItems
|
2355
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2356
|
+
path: _path + ".minItems",
|
2357
|
+
expected: "((number & Type<\"uint32\">) | undefined)",
|
2358
|
+
value: input.minItems
|
2359
|
+
}, errorFactory)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 4294967295 || $guard(_exceptionable, {
|
2360
|
+
path: _path + ".maxItems",
|
2361
|
+
expected: "number & Type<\"uint32\">",
|
2362
|
+
value: input.maxItems
|
2363
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2364
|
+
path: _path + ".maxItems",
|
2365
|
+
expected: "((number & Type<\"uint32\">) | undefined)",
|
2366
|
+
value: input.maxItems
|
2367
|
+
}, errorFactory)) && (undefined === input["x-typia-tuple"] || ("object" === typeof input["x-typia-tuple"] && null !== input["x-typia-tuple"] || $guard(_exceptionable, {
|
2368
|
+
path: _path + "[\"x-typia-tuple\"]",
|
2369
|
+
expected: "(ISwaggerSchema.ITuple | undefined)",
|
2370
|
+
value: input["x-typia-tuple"]
|
2371
|
+
}, errorFactory)) && $ao20(input["x-typia-tuple"], _path + "[\"x-typia-tuple\"]", true && _exceptionable) || $guard(_exceptionable, {
|
2372
|
+
path: _path + "[\"x-typia-tuple\"]",
|
2373
|
+
expected: "(ISwaggerSchema.ITuple | undefined)",
|
2374
|
+
value: input["x-typia-tuple"]
|
2375
|
+
}, errorFactory)) && ("array" === input.type || $guard(_exceptionable, {
|
2376
|
+
path: _path + ".type",
|
2377
|
+
expected: "\"array\"",
|
2378
|
+
value: input.type
|
2379
|
+
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
2380
|
+
path: _path + ".nullable",
|
2381
|
+
expected: "(boolean | undefined)",
|
2382
|
+
value: input.nullable
|
2383
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
2384
|
+
path: _path + ".title",
|
2385
|
+
expected: "(string | undefined)",
|
2386
|
+
value: input.title
|
2387
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
2388
|
+
path: _path + ".description",
|
2389
|
+
expected: "(string | undefined)",
|
2390
|
+
value: input.description
|
2391
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
2392
|
+
path: _path + ".deprecated",
|
2393
|
+
expected: "(boolean | undefined)",
|
2394
|
+
value: input.deprecated
|
2395
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
2396
|
+
path: _path + "[\"x-typia-optional\"]",
|
2397
|
+
expected: "(boolean | undefined)",
|
2398
|
+
value: input["x-typia-optional"]
|
2399
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
2400
|
+
path: _path + "[\"x-typia-rest\"]",
|
2401
|
+
expected: "(boolean | undefined)",
|
2402
|
+
value: input["x-typia-rest"]
|
2403
|
+
}, errorFactory));
|
2404
|
+
const $ao17 = (input, _path, _exceptionable = true) => (undefined === input.properties || ("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) || $guard(_exceptionable, {
|
2405
|
+
path: _path + ".properties",
|
2406
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
2407
|
+
value: input.properties
|
2408
|
+
}, errorFactory)) && $ao18(input.properties, _path + ".properties", true && _exceptionable) || $guard(_exceptionable, {
|
2409
|
+
path: _path + ".properties",
|
2410
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
2411
|
+
value: input.properties
|
2412
|
+
}, errorFactory)) && (undefined === input.required || (Array.isArray(input.required) || $guard(_exceptionable, {
|
2413
|
+
path: _path + ".required",
|
2414
|
+
expected: "(Array<string> | undefined)",
|
2415
|
+
value: input.required
|
2416
|
+
}, errorFactory)) && input.required.every((elem, _index9) => "string" === typeof elem || $guard(_exceptionable, {
|
2417
|
+
path: _path + ".required[" + _index9 + "]",
|
2418
|
+
expected: "string",
|
2419
|
+
value: elem
|
2420
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2421
|
+
path: _path + ".required",
|
2422
|
+
expected: "(Array<string> | undefined)",
|
2423
|
+
value: input.required
|
2424
|
+
}, errorFactory)) && ((null !== input.additionalProperties || $guard(_exceptionable, {
|
2425
|
+
path: _path + ".additionalProperties",
|
2426
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | boolean | undefined)",
|
2427
|
+
value: input.additionalProperties
|
2428
|
+
}, errorFactory)) && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || ("object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) || $guard(_exceptionable, {
|
2429
|
+
path: _path + ".additionalProperties",
|
2430
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | boolean | undefined)",
|
2431
|
+
value: input.additionalProperties
|
2432
|
+
}, errorFactory)) && $au0(input.additionalProperties, _path + ".additionalProperties", true && _exceptionable) || $guard(_exceptionable, {
|
2433
|
+
path: _path + ".additionalProperties",
|
2434
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | boolean | undefined)",
|
2435
|
+
value: input.additionalProperties
|
2436
|
+
}, errorFactory))) && (undefined === input["x-typia-patternProperties"] || ("object" === typeof input["x-typia-patternProperties"] && null !== input["x-typia-patternProperties"] && false === Array.isArray(input["x-typia-patternProperties"]) || $guard(_exceptionable, {
|
2437
|
+
path: _path + "[\"x-typia-patternProperties\"]",
|
2438
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
2439
|
+
value: input["x-typia-patternProperties"]
|
2440
|
+
}, errorFactory)) && $ao18(input["x-typia-patternProperties"], _path + "[\"x-typia-patternProperties\"]", true && _exceptionable) || $guard(_exceptionable, {
|
2441
|
+
path: _path + "[\"x-typia-patternProperties\"]",
|
2442
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
2443
|
+
value: input["x-typia-patternProperties"]
|
2444
|
+
}, errorFactory)) && ("object" === input.type || $guard(_exceptionable, {
|
2445
|
+
path: _path + ".type",
|
2446
|
+
expected: "\"object\"",
|
2447
|
+
value: input.type
|
2448
|
+
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
2449
|
+
path: _path + ".nullable",
|
2450
|
+
expected: "(boolean | undefined)",
|
2451
|
+
value: input.nullable
|
2452
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
2453
|
+
path: _path + ".title",
|
2454
|
+
expected: "(string | undefined)",
|
2455
|
+
value: input.title
|
2456
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
2457
|
+
path: _path + ".description",
|
2458
|
+
expected: "(string | undefined)",
|
2459
|
+
value: input.description
|
2460
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
2461
|
+
path: _path + ".deprecated",
|
2462
|
+
expected: "(boolean | undefined)",
|
2463
|
+
value: input.deprecated
|
2464
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
2465
|
+
path: _path + "[\"x-typia-optional\"]",
|
2466
|
+
expected: "(boolean | undefined)",
|
2467
|
+
value: input["x-typia-optional"]
|
2468
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
2469
|
+
path: _path + "[\"x-typia-rest\"]",
|
2470
|
+
expected: "(boolean | undefined)",
|
2471
|
+
value: input["x-typia-rest"]
|
2472
|
+
}, errorFactory));
|
2473
|
+
const $ao18 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
2474
|
+
const value = input[key];
|
2475
|
+
if (undefined === value)
|
2476
|
+
return true;
|
2477
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
2478
|
+
path: _path + $join(key),
|
2479
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
2480
|
+
value: value
|
2481
|
+
}, errorFactory)) && $au0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
2482
|
+
path: _path + $join(key),
|
2483
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
2484
|
+
value: value
|
2485
|
+
}, errorFactory);
|
2486
|
+
});
|
2487
|
+
const $ao19 = (input, _path, _exceptionable = true) => ("string" === typeof input.$ref || $guard(_exceptionable, {
|
2488
|
+
path: _path + ".$ref",
|
2489
|
+
expected: "string",
|
2490
|
+
value: input.$ref
|
2491
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
2492
|
+
path: _path + ".title",
|
2493
|
+
expected: "(string | undefined)",
|
2494
|
+
value: input.title
|
2495
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
2496
|
+
path: _path + ".description",
|
2497
|
+
expected: "(string | undefined)",
|
2498
|
+
value: input.description
|
2499
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
2500
|
+
path: _path + ".deprecated",
|
2501
|
+
expected: "(boolean | undefined)",
|
2502
|
+
value: input.deprecated
|
2503
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
2504
|
+
path: _path + "[\"x-typia-optional\"]",
|
2505
|
+
expected: "(boolean | undefined)",
|
2506
|
+
value: input["x-typia-optional"]
|
2507
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
2508
|
+
path: _path + "[\"x-typia-rest\"]",
|
2509
|
+
expected: "(boolean | undefined)",
|
2510
|
+
value: input["x-typia-rest"]
|
2511
|
+
}, errorFactory));
|
2512
|
+
const $ao20 = (input, _path, _exceptionable = true) => ((Array.isArray(input.items) || $guard(_exceptionable, {
|
2513
|
+
path: _path + ".items",
|
2514
|
+
expected: "Array<ISwaggerSchema>",
|
2515
|
+
value: input.items
|
2516
|
+
}, errorFactory)) && input.items.every((elem, _index10) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
2517
|
+
path: _path + ".items[" + _index10 + "]",
|
2518
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
2519
|
+
value: elem
|
2520
|
+
}, errorFactory)) && $au0(elem, _path + ".items[" + _index10 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
2521
|
+
path: _path + ".items[" + _index10 + "]",
|
2522
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
2523
|
+
value: elem
|
2524
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2525
|
+
path: _path + ".items",
|
2526
|
+
expected: "Array<ISwaggerSchema>",
|
2527
|
+
value: input.items
|
2528
|
+
}, errorFactory)) && ("array" === input.type || $guard(_exceptionable, {
|
2529
|
+
path: _path + ".type",
|
2530
|
+
expected: "\"array\"",
|
2531
|
+
value: input.type
|
2532
|
+
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
2533
|
+
path: _path + ".nullable",
|
2534
|
+
expected: "(boolean | undefined)",
|
2535
|
+
value: input.nullable
|
2536
|
+
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
2537
|
+
path: _path + ".title",
|
2538
|
+
expected: "(string | undefined)",
|
2539
|
+
value: input.title
|
2540
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
2541
|
+
path: _path + ".description",
|
2542
|
+
expected: "(string | undefined)",
|
2543
|
+
value: input.description
|
2544
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
2545
|
+
path: _path + ".deprecated",
|
2546
|
+
expected: "(boolean | undefined)",
|
2547
|
+
value: input.deprecated
|
2548
|
+
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
2549
|
+
path: _path + "[\"x-typia-optional\"]",
|
2550
|
+
expected: "(boolean | undefined)",
|
2551
|
+
value: input["x-typia-optional"]
|
2552
|
+
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
2553
|
+
path: _path + "[\"x-typia-rest\"]",
|
2554
|
+
expected: "(boolean | undefined)",
|
2555
|
+
value: input["x-typia-rest"]
|
2556
|
+
}, errorFactory));
|
2557
|
+
const $ao21 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
2558
|
+
const value = input[key];
|
2559
|
+
if (undefined === value)
|
2560
|
+
return true;
|
2561
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
2562
|
+
path: _path + $join(key),
|
2563
|
+
expected: "ISwaggerRouteRequestBody",
|
2564
|
+
value: value
|
2565
|
+
}, errorFactory)) && $ao22(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
2566
|
+
path: _path + $join(key),
|
2567
|
+
expected: "ISwaggerRouteRequestBody",
|
2568
|
+
value: value
|
2569
|
+
}, errorFactory);
|
2570
|
+
});
|
2571
|
+
const $ao22 = (input, _path, _exceptionable = true) => (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
2572
|
+
path: _path + ".description",
|
2573
|
+
expected: "(string | undefined)",
|
2574
|
+
value: input.description
|
2575
|
+
}, errorFactory)) && (undefined === input.required || "boolean" === typeof input.required || $guard(_exceptionable, {
|
2576
|
+
path: _path + ".required",
|
2577
|
+
expected: "(boolean | undefined)",
|
2578
|
+
value: input.required
|
2579
|
+
}, errorFactory)) && (undefined === input.content || ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) || $guard(_exceptionable, {
|
2580
|
+
path: _path + ".content",
|
2581
|
+
expected: "(ISwaggerRouteBodyContent | undefined)",
|
2582
|
+
value: input.content
|
2583
|
+
}, errorFactory)) && $ao23(input.content, _path + ".content", true && _exceptionable) || $guard(_exceptionable, {
|
2584
|
+
path: _path + ".content",
|
2585
|
+
expected: "(ISwaggerRouteBodyContent | undefined)",
|
2586
|
+
value: input.content
|
2587
|
+
}, errorFactory));
|
2588
|
+
const $ao23 = (input, _path, _exceptionable = true) => (undefined === input["text/plain"] || ("object" === typeof input["text/plain"] && null !== input["text/plain"] && false === Array.isArray(input["text/plain"]) || $guard(_exceptionable, {
|
2589
|
+
path: _path + "[\"text/plain\"]",
|
2590
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
2591
|
+
value: input["text/plain"]
|
2592
|
+
}, errorFactory)) && $ao24(input["text/plain"], _path + "[\"text/plain\"]", true && _exceptionable) || $guard(_exceptionable, {
|
2593
|
+
path: _path + "[\"text/plain\"]",
|
2594
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
2595
|
+
value: input["text/plain"]
|
2596
|
+
}, errorFactory)) && (undefined === input["application/json"] || ("object" === typeof input["application/json"] && null !== input["application/json"] && false === Array.isArray(input["application/json"]) || $guard(_exceptionable, {
|
2597
|
+
path: _path + "[\"application/json\"]",
|
2598
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
2599
|
+
value: input["application/json"]
|
2600
|
+
}, errorFactory)) && $ao24(input["application/json"], _path + "[\"application/json\"]", true && _exceptionable) || $guard(_exceptionable, {
|
2601
|
+
path: _path + "[\"application/json\"]",
|
2602
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
2603
|
+
value: input["application/json"]
|
2604
|
+
}, errorFactory)) && (undefined === input["application/x-www-form-urlencoded"] || ("object" === typeof input["application/x-www-form-urlencoded"] && null !== input["application/x-www-form-urlencoded"] && false === Array.isArray(input["application/x-www-form-urlencoded"]) || $guard(_exceptionable, {
|
2605
|
+
path: _path + "[\"application/x-www-form-urlencoded\"]",
|
2606
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
2607
|
+
value: input["application/x-www-form-urlencoded"]
|
2608
|
+
}, errorFactory)) && $ao24(input["application/x-www-form-urlencoded"], _path + "[\"application/x-www-form-urlencoded\"]", true && _exceptionable) || $guard(_exceptionable, {
|
2609
|
+
path: _path + "[\"application/x-www-form-urlencoded\"]",
|
2610
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
2611
|
+
value: input["application/x-www-form-urlencoded"]
|
2612
|
+
}, errorFactory)) && (undefined === input["multipart/form-data"] || ("object" === typeof input["multipart/form-data"] && null !== input["multipart/form-data"] && false === Array.isArray(input["multipart/form-data"]) || $guard(_exceptionable, {
|
2613
|
+
path: _path + "[\"multipart/form-data\"]",
|
2614
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
2615
|
+
value: input["multipart/form-data"]
|
2616
|
+
}, errorFactory)) && $ao24(input["multipart/form-data"], _path + "[\"multipart/form-data\"]", true && _exceptionable) || $guard(_exceptionable, {
|
2617
|
+
path: _path + "[\"multipart/form-data\"]",
|
2618
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
2619
|
+
value: input["multipart/form-data"]
|
2620
|
+
}, errorFactory)) && (undefined === input["*/*"] || ("object" === typeof input["*/*"] && null !== input["*/*"] && false === Array.isArray(input["*/*"]) || $guard(_exceptionable, {
|
2621
|
+
path: _path + "[\"*/*\"]",
|
2622
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
2623
|
+
value: input["*/*"]
|
2624
|
+
}, errorFactory)) && $ao24(input["*/*"], _path + "[\"*/*\"]", true && _exceptionable) || $guard(_exceptionable, {
|
2625
|
+
path: _path + "[\"*/*\"]",
|
2626
|
+
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
2627
|
+
value: input["*/*"]
|
2628
|
+
}, errorFactory));
|
2629
|
+
const $ao24 = (input, _path, _exceptionable = true) => (undefined === input.schema || ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $guard(_exceptionable, {
|
2630
|
+
path: _path + ".schema",
|
2631
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | undefined)",
|
2632
|
+
value: input.schema
|
2633
|
+
}, errorFactory)) && $au0(input.schema, _path + ".schema", true && _exceptionable) || $guard(_exceptionable, {
|
2634
|
+
path: _path + ".schema",
|
2635
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | undefined)",
|
2636
|
+
value: input.schema
|
2637
|
+
}, errorFactory)) && (undefined === input["x-nestia-encrypted"] || "boolean" === typeof input["x-nestia-encrypted"] || $guard(_exceptionable, {
|
2638
|
+
path: _path + "[\"x-nestia-encrypted\"]",
|
2639
|
+
expected: "(boolean | undefined)",
|
2640
|
+
value: input["x-nestia-encrypted"]
|
2641
|
+
}, errorFactory));
|
2642
|
+
const $ao25 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
2643
|
+
const value = input[key];
|
2644
|
+
if (undefined === value)
|
2645
|
+
return true;
|
2646
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
2647
|
+
path: _path + $join(key),
|
2648
|
+
expected: "ISwaggerRouteResponse",
|
2649
|
+
value: value
|
2650
|
+
}, errorFactory)) && $ao26(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
2651
|
+
path: _path + $join(key),
|
2652
|
+
expected: "ISwaggerRouteResponse",
|
2653
|
+
value: value
|
2654
|
+
}, errorFactory);
|
2655
|
+
});
|
2656
|
+
const $ao26 = (input, _path, _exceptionable = true) => (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
2657
|
+
path: _path + ".description",
|
2658
|
+
expected: "(string | undefined)",
|
2659
|
+
value: input.description
|
2660
|
+
}, errorFactory)) && (undefined === input.content || ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) || $guard(_exceptionable, {
|
2661
|
+
path: _path + ".content",
|
2662
|
+
expected: "(ISwaggerRouteBodyContent | undefined)",
|
2663
|
+
value: input.content
|
2664
|
+
}, errorFactory)) && $ao23(input.content, _path + ".content", true && _exceptionable) || $guard(_exceptionable, {
|
2665
|
+
path: _path + ".content",
|
2666
|
+
expected: "(ISwaggerRouteBodyContent | undefined)",
|
2667
|
+
value: input.content
|
2668
|
+
}, errorFactory));
|
2669
|
+
const $ao27 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
2670
|
+
const value = input[key];
|
2671
|
+
if (undefined === value)
|
2672
|
+
return true;
|
2673
|
+
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
2674
|
+
path: _path + $join(key),
|
2675
|
+
expected: "(ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IOAuth2 | ISwaggerSecurityScheme.IOpenId)",
|
2676
|
+
value: value
|
2677
|
+
}, errorFactory)) && $au2(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
2678
|
+
path: _path + $join(key),
|
2679
|
+
expected: "(ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IOAuth2 | ISwaggerSecurityScheme.IOpenId)",
|
2680
|
+
value: value
|
2681
|
+
}, errorFactory);
|
2682
|
+
});
|
2683
|
+
const $ao28 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
2684
|
+
path: _path + ".type",
|
2685
|
+
expected: "\"http\"",
|
2686
|
+
value: input.type
|
2687
|
+
}, errorFactory)) && ("basic" === input.scheme || $guard(_exceptionable, {
|
2688
|
+
path: _path + ".scheme",
|
2689
|
+
expected: "\"basic\"",
|
2690
|
+
value: input.scheme
|
2691
|
+
}, errorFactory));
|
2692
|
+
const $ao29 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
2693
|
+
path: _path + ".type",
|
2694
|
+
expected: "\"http\"",
|
2695
|
+
value: input.type
|
2696
|
+
}, errorFactory)) && ("bearer" === input.scheme || $guard(_exceptionable, {
|
2697
|
+
path: _path + ".scheme",
|
2698
|
+
expected: "\"bearer\"",
|
2699
|
+
value: input.scheme
|
2700
|
+
}, errorFactory)) && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat || $guard(_exceptionable, {
|
2701
|
+
path: _path + ".bearerFormat",
|
2702
|
+
expected: "(string | undefined)",
|
2703
|
+
value: input.bearerFormat
|
2704
|
+
}, errorFactory));
|
2705
|
+
const $ao30 = (input, _path, _exceptionable = true) => ("apiKey" === input.type || $guard(_exceptionable, {
|
2706
|
+
path: _path + ".type",
|
2707
|
+
expected: "\"apiKey\"",
|
2708
|
+
value: input.type
|
2709
|
+
}, errorFactory)) && (undefined === input["in"] || "cookie" === input["in"] || "header" === input["in"] || "query" === input["in"] || $guard(_exceptionable, {
|
2710
|
+
path: _path + "[\"in\"]",
|
2711
|
+
expected: "(\"cookie\" | \"header\" | \"query\" | undefined)",
|
2712
|
+
value: input["in"]
|
2713
|
+
}, errorFactory)) && (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
2714
|
+
path: _path + ".name",
|
2715
|
+
expected: "(string | undefined)",
|
2716
|
+
value: input.name
|
2717
|
+
}, errorFactory));
|
2718
|
+
const $ao31 = (input, _path, _exceptionable = true) => ("openIdConnect" === input.type || $guard(_exceptionable, {
|
2719
|
+
path: _path + ".type",
|
2720
|
+
expected: "\"openIdConnect\"",
|
2721
|
+
value: input.type
|
2722
|
+
}, errorFactory)) && ("string" === typeof input.openIdConnectUrl || $guard(_exceptionable, {
|
2723
|
+
path: _path + ".openIdConnectUrl",
|
2724
|
+
expected: "string",
|
2725
|
+
value: input.openIdConnectUrl
|
2726
|
+
}, errorFactory));
|
2727
|
+
const $ao32 = (input, _path, _exceptionable = true) => ("oauth2" === input.type || $guard(_exceptionable, {
|
2728
|
+
path: _path + ".type",
|
2729
|
+
expected: "\"oauth2\"",
|
2730
|
+
value: input.type
|
2731
|
+
}, errorFactory)) && (("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) || $guard(_exceptionable, {
|
2732
|
+
path: _path + ".flows",
|
2733
|
+
expected: "ISwaggerSecurityScheme.IOAuth2.IFlowSet",
|
2734
|
+
value: input.flows
|
2735
|
+
}, errorFactory)) && $ao33(input.flows, _path + ".flows", true && _exceptionable) || $guard(_exceptionable, {
|
2736
|
+
path: _path + ".flows",
|
2737
|
+
expected: "ISwaggerSecurityScheme.IOAuth2.IFlowSet",
|
2738
|
+
value: input.flows
|
2739
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
2740
|
+
path: _path + ".description",
|
2741
|
+
expected: "(string | undefined)",
|
2742
|
+
value: input.description
|
2743
|
+
}, errorFactory));
|
2744
|
+
const $ao33 = (input, _path, _exceptionable = true) => (undefined === input.authorizationCode || ("object" === typeof input.authorizationCode && null !== input.authorizationCode || $guard(_exceptionable, {
|
2745
|
+
path: _path + ".authorizationCode",
|
2746
|
+
expected: "(ISwaggerSecurityScheme.IOAuth2.IFlow | undefined)",
|
2747
|
+
value: input.authorizationCode
|
2748
|
+
}, errorFactory)) && $ao34(input.authorizationCode, _path + ".authorizationCode", true && _exceptionable) || $guard(_exceptionable, {
|
2749
|
+
path: _path + ".authorizationCode",
|
2750
|
+
expected: "(ISwaggerSecurityScheme.IOAuth2.IFlow | undefined)",
|
2751
|
+
value: input.authorizationCode
|
2752
|
+
}, errorFactory)) && (undefined === input.implicit || ("object" === typeof input.implicit && null !== input.implicit || $guard(_exceptionable, {
|
2753
|
+
path: _path + ".implicit",
|
2754
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
2755
|
+
value: input.implicit
|
2756
|
+
}, errorFactory)) && $ao36(input.implicit, _path + ".implicit", true && _exceptionable) || $guard(_exceptionable, {
|
2757
|
+
path: _path + ".implicit",
|
2758
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
2759
|
+
value: input.implicit
|
2760
|
+
}, errorFactory)) && (undefined === input.password || ("object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) || $guard(_exceptionable, {
|
2761
|
+
path: _path + ".password",
|
2762
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
2763
|
+
value: input.password
|
2764
|
+
}, errorFactory)) && $ao37(input.password, _path + ".password", true && _exceptionable) || $guard(_exceptionable, {
|
2765
|
+
path: _path + ".password",
|
2766
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
2767
|
+
value: input.password
|
2768
|
+
}, errorFactory)) && (undefined === input.clientCredentials || ("object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) || $guard(_exceptionable, {
|
2769
|
+
path: _path + ".clientCredentials",
|
2770
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
2771
|
+
value: input.clientCredentials
|
2772
|
+
}, errorFactory)) && $ao37(input.clientCredentials, _path + ".clientCredentials", true && _exceptionable) || $guard(_exceptionable, {
|
2773
|
+
path: _path + ".clientCredentials",
|
2774
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
2775
|
+
value: input.clientCredentials
|
2776
|
+
}, errorFactory));
|
2777
|
+
const $ao34 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
2778
|
+
path: _path + ".authorizationUrl",
|
2779
|
+
expected: "string",
|
2780
|
+
value: input.authorizationUrl
|
2781
|
+
}, errorFactory)) && (undefined === input.tokenUrl || "string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
2782
|
+
path: _path + ".tokenUrl",
|
2783
|
+
expected: "(string | undefined)",
|
2784
|
+
value: input.tokenUrl
|
2785
|
+
}, errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
2786
|
+
path: _path + ".refreshUrl",
|
2787
|
+
expected: "(string | undefined)",
|
2788
|
+
value: input.refreshUrl
|
2789
|
+
}, errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
2790
|
+
path: _path + ".scopes",
|
2791
|
+
expected: "(Record<string, string> | undefined)",
|
2792
|
+
value: input.scopes
|
2793
|
+
}, errorFactory)) && $ao35(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
2794
|
+
path: _path + ".scopes",
|
2795
|
+
expected: "(Record<string, string> | undefined)",
|
2796
|
+
value: input.scopes
|
2797
|
+
}, errorFactory));
|
2798
|
+
const $ao35 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
2799
|
+
const value = input[key];
|
2800
|
+
if (undefined === value)
|
2801
|
+
return true;
|
2802
|
+
return "string" === typeof value || $guard(_exceptionable, {
|
2803
|
+
path: _path + $join(key),
|
2804
|
+
expected: "string",
|
2805
|
+
value: value
|
2806
|
+
}, errorFactory);
|
2807
|
+
});
|
2808
|
+
const $ao36 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
2809
|
+
path: _path + ".authorizationUrl",
|
2810
|
+
expected: "string",
|
2811
|
+
value: input.authorizationUrl
|
2812
|
+
}, errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
2813
|
+
path: _path + ".refreshUrl",
|
2814
|
+
expected: "(string | undefined)",
|
2815
|
+
value: input.refreshUrl
|
2816
|
+
}, errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
2817
|
+
path: _path + ".scopes",
|
2818
|
+
expected: "(Record<string, string> | undefined)",
|
2819
|
+
value: input.scopes
|
2820
|
+
}, errorFactory)) && $ao35(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
2821
|
+
path: _path + ".scopes",
|
2822
|
+
expected: "(Record<string, string> | undefined)",
|
2823
|
+
value: input.scopes
|
2824
|
+
}, errorFactory));
|
2825
|
+
const $ao37 = (input, _path, _exceptionable = true) => (undefined === input.tokenUrl || "string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
2826
|
+
path: _path + ".tokenUrl",
|
2827
|
+
expected: "(string | undefined)",
|
2828
|
+
value: input.tokenUrl
|
2829
|
+
}, errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
2830
|
+
path: _path + ".refreshUrl",
|
2831
|
+
expected: "(string | undefined)",
|
2832
|
+
value: input.refreshUrl
|
2833
|
+
}, errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
2834
|
+
path: _path + ".scopes",
|
2835
|
+
expected: "(Record<string, string> | undefined)",
|
2836
|
+
value: input.scopes
|
2837
|
+
}, errorFactory)) && $ao35(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
2838
|
+
path: _path + ".scopes",
|
2839
|
+
expected: "(Record<string, string> | undefined)",
|
2840
|
+
value: input.scopes
|
2841
|
+
}, errorFactory));
|
2842
|
+
const $ao38 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
2843
|
+
const value = input[key];
|
2844
|
+
if (undefined === value)
|
2845
|
+
return true;
|
2846
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
2847
|
+
path: _path + $join(key),
|
2848
|
+
expected: "ISwagger.IPath",
|
2849
|
+
value: value
|
2850
|
+
}, errorFactory)) && $ao39(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
2851
|
+
path: _path + $join(key),
|
2852
|
+
expected: "ISwagger.IPath",
|
2853
|
+
value: value
|
2854
|
+
}, errorFactory);
|
2855
|
+
});
|
2856
|
+
const $ao39 = (input, _path, _exceptionable = true) => (undefined === input.get || ("object" === typeof input.get && null !== input.get && false === Array.isArray(input.get) || $guard(_exceptionable, {
|
2857
|
+
path: _path + ".get",
|
2858
|
+
expected: "(ISwaggerRoute | undefined)",
|
2859
|
+
value: input.get
|
2860
|
+
}, errorFactory)) && $ao40(input.get, _path + ".get", true && _exceptionable) || $guard(_exceptionable, {
|
2861
|
+
path: _path + ".get",
|
2862
|
+
expected: "(ISwaggerRoute | undefined)",
|
2863
|
+
value: input.get
|
2864
|
+
}, errorFactory)) && (undefined === input.post || ("object" === typeof input.post && null !== input.post && false === Array.isArray(input.post) || $guard(_exceptionable, {
|
2865
|
+
path: _path + ".post",
|
2866
|
+
expected: "(ISwaggerRoute | undefined)",
|
2867
|
+
value: input.post
|
2868
|
+
}, errorFactory)) && $ao40(input.post, _path + ".post", true && _exceptionable) || $guard(_exceptionable, {
|
2869
|
+
path: _path + ".post",
|
2870
|
+
expected: "(ISwaggerRoute | undefined)",
|
2871
|
+
value: input.post
|
2872
|
+
}, errorFactory)) && (undefined === input.patch || ("object" === typeof input.patch && null !== input.patch && false === Array.isArray(input.patch) || $guard(_exceptionable, {
|
2873
|
+
path: _path + ".patch",
|
2874
|
+
expected: "(ISwaggerRoute | undefined)",
|
2875
|
+
value: input.patch
|
2876
|
+
}, errorFactory)) && $ao40(input.patch, _path + ".patch", true && _exceptionable) || $guard(_exceptionable, {
|
2877
|
+
path: _path + ".patch",
|
2878
|
+
expected: "(ISwaggerRoute | undefined)",
|
2879
|
+
value: input.patch
|
2880
|
+
}, errorFactory)) && (undefined === input.put || ("object" === typeof input.put && null !== input.put && false === Array.isArray(input.put) || $guard(_exceptionable, {
|
2881
|
+
path: _path + ".put",
|
2882
|
+
expected: "(ISwaggerRoute | undefined)",
|
2883
|
+
value: input.put
|
2884
|
+
}, errorFactory)) && $ao40(input.put, _path + ".put", true && _exceptionable) || $guard(_exceptionable, {
|
2885
|
+
path: _path + ".put",
|
2886
|
+
expected: "(ISwaggerRoute | undefined)",
|
2887
|
+
value: input.put
|
2888
|
+
}, errorFactory)) && (undefined === input["delete"] || ("object" === typeof input["delete"] && null !== input["delete"] && false === Array.isArray(input["delete"]) || $guard(_exceptionable, {
|
2889
|
+
path: _path + "[\"delete\"]",
|
2890
|
+
expected: "(ISwaggerRoute | undefined)",
|
2891
|
+
value: input["delete"]
|
2892
|
+
}, errorFactory)) && $ao40(input["delete"], _path + "[\"delete\"]", true && _exceptionable) || $guard(_exceptionable, {
|
2893
|
+
path: _path + "[\"delete\"]",
|
2894
|
+
expected: "(ISwaggerRoute | undefined)",
|
2895
|
+
value: input["delete"]
|
2896
|
+
}, errorFactory));
|
2897
|
+
const $ao40 = (input, _path, _exceptionable = true) => (undefined === input.parameters || (Array.isArray(input.parameters) || $guard(_exceptionable, {
|
2898
|
+
path: _path + ".parameters",
|
2899
|
+
expected: "(Array<ISwaggerRouteParameter | IReference> | undefined)",
|
2900
|
+
value: input.parameters
|
2901
|
+
}, errorFactory)) && input.parameters.every((elem, _index11) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
2902
|
+
path: _path + ".parameters[" + _index11 + "]",
|
2903
|
+
expected: "(ISwaggerRouteParameter | ISwaggerRouteParameter.IReference)",
|
2904
|
+
value: elem
|
2905
|
+
}, errorFactory)) && $au1(elem, _path + ".parameters[" + _index11 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
2906
|
+
path: _path + ".parameters[" + _index11 + "]",
|
2907
|
+
expected: "(ISwaggerRouteParameter | ISwaggerRouteParameter.IReference)",
|
2908
|
+
value: elem
|
2909
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2910
|
+
path: _path + ".parameters",
|
2911
|
+
expected: "(Array<ISwaggerRouteParameter | IReference> | undefined)",
|
2912
|
+
value: input.parameters
|
2913
|
+
}, errorFactory)) && (undefined === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody && false === Array.isArray(input.requestBody) || $guard(_exceptionable, {
|
2914
|
+
path: _path + ".requestBody",
|
2915
|
+
expected: "(ISwaggerRouteRequestBody | undefined)",
|
2916
|
+
value: input.requestBody
|
2917
|
+
}, errorFactory)) && $ao22(input.requestBody, _path + ".requestBody", true && _exceptionable) || $guard(_exceptionable, {
|
2918
|
+
path: _path + ".requestBody",
|
2919
|
+
expected: "(ISwaggerRouteRequestBody | undefined)",
|
2920
|
+
value: input.requestBody
|
2921
|
+
}, errorFactory)) && (undefined === input.responses || ("object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) || $guard(_exceptionable, {
|
2922
|
+
path: _path + ".responses",
|
2923
|
+
expected: "(Record<string, ISwaggerRouteResponse | IReference> | undefined)",
|
2924
|
+
value: input.responses
|
2925
|
+
}, errorFactory)) && $ao42(input.responses, _path + ".responses", true && _exceptionable) || $guard(_exceptionable, {
|
2926
|
+
path: _path + ".responses",
|
2927
|
+
expected: "(Record<string, ISwaggerRouteResponse | IReference> | undefined)",
|
2928
|
+
value: input.responses
|
2929
|
+
}, errorFactory)) && (undefined === input.summary || "string" === typeof input.summary || $guard(_exceptionable, {
|
2930
|
+
path: _path + ".summary",
|
2931
|
+
expected: "(string | undefined)",
|
2932
|
+
value: input.summary
|
2933
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
2934
|
+
path: _path + ".description",
|
2935
|
+
expected: "(string | undefined)",
|
2936
|
+
value: input.description
|
2937
|
+
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
2938
|
+
path: _path + ".deprecated",
|
2939
|
+
expected: "(boolean | undefined)",
|
2940
|
+
value: input.deprecated
|
2941
|
+
}, errorFactory)) && (undefined === input.security || (Array.isArray(input.security) || $guard(_exceptionable, {
|
2942
|
+
path: _path + ".security",
|
2943
|
+
expected: "(Array<Record<string, Array<string>>> | undefined)",
|
2944
|
+
value: input.security
|
2945
|
+
}, errorFactory)) && input.security.every((elem, _index12) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
2946
|
+
path: _path + ".security[" + _index12 + "]",
|
2947
|
+
expected: "Record<string, Array<string>>",
|
2948
|
+
value: elem
|
2949
|
+
}, errorFactory)) && $ao44(elem, _path + ".security[" + _index12 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
2950
|
+
path: _path + ".security[" + _index12 + "]",
|
2951
|
+
expected: "Record<string, Array<string>>",
|
2952
|
+
value: elem
|
2953
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2954
|
+
path: _path + ".security",
|
2955
|
+
expected: "(Array<Record<string, Array<string>>> | undefined)",
|
2956
|
+
value: input.security
|
2957
|
+
}, errorFactory)) && (undefined === input.tags || (Array.isArray(input.tags) || $guard(_exceptionable, {
|
2958
|
+
path: _path + ".tags",
|
2959
|
+
expected: "(Array<string> | undefined)",
|
2960
|
+
value: input.tags
|
2961
|
+
}, errorFactory)) && input.tags.every((elem, _index13) => "string" === typeof elem || $guard(_exceptionable, {
|
2962
|
+
path: _path + ".tags[" + _index13 + "]",
|
2963
|
+
expected: "string",
|
2964
|
+
value: elem
|
2965
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2966
|
+
path: _path + ".tags",
|
2967
|
+
expected: "(Array<string> | undefined)",
|
2968
|
+
value: input.tags
|
2969
|
+
}, errorFactory)) && (undefined === input["x-nestia-jsDocTags"] || (Array.isArray(input["x-nestia-jsDocTags"]) || $guard(_exceptionable, {
|
2970
|
+
path: _path + "[\"x-nestia-jsDocTags\"]",
|
2971
|
+
expected: "(Array<IJsDocTagInfo> | undefined)",
|
2972
|
+
value: input["x-nestia-jsDocTags"]
|
2973
|
+
}, errorFactory)) && input["x-nestia-jsDocTags"].every((elem, _index14) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
2974
|
+
path: _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]",
|
2975
|
+
expected: "IJsDocTagInfo",
|
2976
|
+
value: elem
|
2977
|
+
}, errorFactory)) && $ao45(elem, _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
2978
|
+
path: _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]",
|
2979
|
+
expected: "IJsDocTagInfo",
|
2980
|
+
value: elem
|
2981
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
2982
|
+
path: _path + "[\"x-nestia-jsDocTags\"]",
|
2983
|
+
expected: "(Array<IJsDocTagInfo> | undefined)",
|
2984
|
+
value: input["x-nestia-jsDocTags"]
|
2985
|
+
}, errorFactory));
|
2986
|
+
const $ao41 = (input, _path, _exceptionable = true) => "string" === typeof input.$ref && RegExp(/^#\/components\/parameters\/(.*)/).test(input.$ref) || $guard(_exceptionable, {
|
2987
|
+
path: _path + ".$ref",
|
2988
|
+
expected: "`#/components/parameters/${string}`",
|
2989
|
+
value: input.$ref
|
2990
|
+
}, errorFactory);
|
2991
|
+
const $ao42 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
2992
|
+
const value = input[key];
|
2993
|
+
if (undefined === value)
|
2994
|
+
return true;
|
2995
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
2996
|
+
path: _path + $join(key),
|
2997
|
+
expected: "(ISwaggerRouteResponse | ISwaggerRouteResponse.IReference)",
|
2998
|
+
value: value
|
2999
|
+
}, errorFactory)) && $au3(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
3000
|
+
path: _path + $join(key),
|
3001
|
+
expected: "(ISwaggerRouteResponse | ISwaggerRouteResponse.IReference)",
|
3002
|
+
value: value
|
3003
|
+
}, errorFactory);
|
3004
|
+
});
|
3005
|
+
const $ao43 = (input, _path, _exceptionable = true) => "string" === typeof input.$ref && RegExp(/^#\/components\/responses\/(.*)/).test(input.$ref) || $guard(_exceptionable, {
|
3006
|
+
path: _path + ".$ref",
|
3007
|
+
expected: "`#/components/responses/${string}`",
|
3008
|
+
value: input.$ref
|
3009
|
+
}, errorFactory);
|
3010
|
+
const $ao44 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
3011
|
+
const value = input[key];
|
3012
|
+
if (undefined === value)
|
3013
|
+
return true;
|
3014
|
+
return (Array.isArray(value) || $guard(_exceptionable, {
|
3015
|
+
path: _path + $join(key),
|
3016
|
+
expected: "Array<string>",
|
3017
|
+
value: value
|
3018
|
+
}, errorFactory)) && value.every((elem, _index15) => "string" === typeof elem || $guard(_exceptionable, {
|
3019
|
+
path: _path + $join(key) + "[" + _index15 + "]",
|
3020
|
+
expected: "string",
|
3021
|
+
value: elem
|
3022
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
3023
|
+
path: _path + $join(key),
|
3024
|
+
expected: "Array<string>",
|
3025
|
+
value: value
|
3026
|
+
}, errorFactory);
|
3027
|
+
});
|
3028
|
+
const $ao45 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
|
3029
|
+
path: _path + ".name",
|
3030
|
+
expected: "string",
|
3031
|
+
value: input.name
|
3032
|
+
}, errorFactory)) && (undefined === input.text || (Array.isArray(input.text) || $guard(_exceptionable, {
|
3033
|
+
path: _path + ".text",
|
3034
|
+
expected: "(Array<IJsDocTagInfo.IText> | undefined)",
|
3035
|
+
value: input.text
|
3036
|
+
}, errorFactory)) && input.text.every((elem, _index16) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
3037
|
+
path: _path + ".text[" + _index16 + "]",
|
3038
|
+
expected: "IJsDocTagInfo.IText",
|
3039
|
+
value: elem
|
3040
|
+
}, errorFactory)) && $ao46(elem, _path + ".text[" + _index16 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
3041
|
+
path: _path + ".text[" + _index16 + "]",
|
3042
|
+
expected: "IJsDocTagInfo.IText",
|
3043
|
+
value: elem
|
3044
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
3045
|
+
path: _path + ".text",
|
3046
|
+
expected: "(Array<IJsDocTagInfo.IText> | undefined)",
|
3047
|
+
value: input.text
|
3048
|
+
}, errorFactory));
|
3049
|
+
const $ao46 = (input, _path, _exceptionable = true) => ("string" === typeof input.text || $guard(_exceptionable, {
|
3050
|
+
path: _path + ".text",
|
3051
|
+
expected: "string",
|
3052
|
+
value: input.text
|
3053
|
+
}, errorFactory)) && ("string" === typeof input.kind || $guard(_exceptionable, {
|
3054
|
+
path: _path + ".kind",
|
3055
|
+
expected: "string",
|
3056
|
+
value: input.kind
|
3057
|
+
}, errorFactory));
|
3058
|
+
const $au0 = (input, _path, _exceptionable = true) => (() => {
|
3059
|
+
if ("null" === input.type)
|
3060
|
+
return $ao9(input, _path, true && _exceptionable);
|
3061
|
+
else if (undefined !== input.anyOf)
|
3062
|
+
return $ao10(input, _path, true && _exceptionable);
|
3063
|
+
else if (undefined !== input.oneOf)
|
3064
|
+
return $ao11(input, _path, true && _exceptionable);
|
3065
|
+
else if ("boolean" === input.type)
|
3066
|
+
return $ao12(input, _path, true && _exceptionable);
|
3067
|
+
else if ("number" === input.type)
|
3068
|
+
return $ao14(input, _path, true && _exceptionable);
|
3069
|
+
else if ("integer" === input.type)
|
3070
|
+
return $ao13(input, _path, true && _exceptionable);
|
3071
|
+
else if ("string" === input.type)
|
3072
|
+
return $ao15(input, _path, true && _exceptionable);
|
3073
|
+
else if ("array" === input.type)
|
3074
|
+
return $ao16(input, _path, true && _exceptionable);
|
3075
|
+
else if ("object" === input.type)
|
3076
|
+
return $ao17(input, _path, true && _exceptionable);
|
3077
|
+
else if (undefined !== input.$ref)
|
3078
|
+
return $ao19(input, _path, true && _exceptionable);
|
3079
|
+
else
|
3080
|
+
return $ao8(input, _path, true && _exceptionable);
|
3081
|
+
})();
|
3082
|
+
const $au1 = (input, _path, _exceptionable = true) => (() => {
|
3083
|
+
if (undefined !== input["in"])
|
3084
|
+
return $ao7(input, _path, true && _exceptionable);
|
3085
|
+
else if (undefined !== input.$ref)
|
3086
|
+
return $ao41(input, _path, true && _exceptionable);
|
3087
|
+
else
|
3088
|
+
return $guard(_exceptionable, {
|
3089
|
+
path: _path,
|
3090
|
+
expected: "(ISwaggerRouteParameter | ISwaggerRouteParameter.IReference)",
|
3091
|
+
value: input
|
3092
|
+
}, errorFactory);
|
3093
|
+
})();
|
3094
|
+
const $au2 = (input, _path, _exceptionable = true) => (() => {
|
3095
|
+
if ("basic" === input.scheme)
|
3096
|
+
return $ao28(input, _path, true && _exceptionable);
|
3097
|
+
else if ("bearer" === input.scheme)
|
3098
|
+
return $ao29(input, _path, true && _exceptionable);
|
3099
|
+
else if ("apiKey" === input.type)
|
3100
|
+
return $ao30(input, _path, true && _exceptionable);
|
3101
|
+
else if ("openIdConnect" === input.type)
|
3102
|
+
return $ao31(input, _path, true && _exceptionable);
|
3103
|
+
else if ("oauth2" === input.type)
|
3104
|
+
return $ao32(input, _path, true && _exceptionable);
|
3105
|
+
else
|
3106
|
+
return $guard(_exceptionable, {
|
3107
|
+
path: _path,
|
3108
|
+
expected: "(ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IOpenId | ISwaggerSecurityScheme.IOAuth2)",
|
3109
|
+
value: input
|
3110
|
+
}, errorFactory);
|
3111
|
+
})();
|
3112
|
+
const $au3 = (input, _path, _exceptionable = true) => (() => {
|
3113
|
+
if (undefined !== input.$ref)
|
3114
|
+
return $ao43(input, _path, true && _exceptionable);
|
3115
|
+
else
|
3116
|
+
return $ao26(input, _path, true && _exceptionable);
|
3117
|
+
})();
|
3118
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
3119
|
+
path: _path + "",
|
3120
|
+
expected: "ISwagger",
|
3121
|
+
value: input
|
3122
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
3123
|
+
path: _path + "",
|
3124
|
+
expected: "ISwagger",
|
3125
|
+
value: input
|
3126
|
+
}, errorFactory);
|
3127
|
+
})(input, "$input", true);
|
3128
|
+
return input;
|
3129
|
+
})(converter.convert());
|
3130
|
+
};
|
3131
|
+
})(OpenApiConverter || (exports.OpenApiConverter = OpenApiConverter = {}));
|
3132
|
+
//# sourceMappingURL=OpenApiConverter.js.map
|