@nestia/migrate 0.1.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/.prettierignore +3 -0
- package/.vscode/settings.json +10 -0
- package/lib/NestiaMigrateApplication.d.ts +18 -0
- package/lib/NestiaMigrateApplication.js +1330 -0
- package/lib/NestiaMigrateApplication.js.map +1 -0
- package/lib/archivers/FileArchiver.d.ts +8 -0
- package/lib/archivers/FileArchiver.js +35 -0
- package/lib/archivers/FileArchiver.js.map +1 -0
- package/lib/bundles/TEMPLATE.d.ts +5 -0
- package/lib/bundles/TEMPLATE.js +261 -0
- package/lib/bundles/TEMPLATE.js.map +1 -0
- package/lib/executable/bundle.d.ts +1 -0
- package/lib/executable/bundle.js +75 -0
- package/lib/executable/bundle.js.map +1 -0
- package/lib/executable/migrate.d.ts +2 -0
- package/lib/executable/migrate.js +65 -0
- package/lib/executable/migrate.js.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +32 -0
- package/lib/index.js.map +1 -0
- package/lib/module.d.ts +3 -0
- package/lib/module.js +20 -0
- package/lib/module.js.map +1 -0
- package/lib/programmers/ControllerProgrammer.d.ts +6 -0
- package/lib/programmers/ControllerProgrammer.js +119 -0
- package/lib/programmers/ControllerProgrammer.js.map +1 -0
- package/lib/programmers/DtoProgrammer.d.ts +6 -0
- package/lib/programmers/DtoProgrammer.js +95 -0
- package/lib/programmers/DtoProgrammer.js.map +1 -0
- package/lib/programmers/MigrateProgrammer.d.ts +7 -0
- package/lib/programmers/MigrateProgrammer.js +31 -0
- package/lib/programmers/MigrateProgrammer.js.map +1 -0
- package/lib/programmers/RouteProgrammer.d.ts +11 -0
- package/lib/programmers/RouteProgrammer.js +199 -0
- package/lib/programmers/RouteProgrammer.js.map +1 -0
- package/lib/programmers/SchemaProgrammer.d.ts +4 -0
- package/lib/programmers/SchemaProgrammer.js +163 -0
- package/lib/programmers/SchemaProgrammer.js.map +1 -0
- package/lib/structures/IMigrateController.d.ts +7 -0
- package/lib/structures/IMigrateController.js +3 -0
- package/lib/structures/IMigrateController.js.map +1 -0
- package/lib/structures/IMigrateDto.d.ts +7 -0
- package/lib/structures/IMigrateDto.js +3 -0
- package/lib/structures/IMigrateDto.js.map +1 -0
- package/lib/structures/IMigrateFile.d.ts +5 -0
- package/lib/structures/IMigrateFile.js +3 -0
- package/lib/structures/IMigrateFile.js.map +1 -0
- package/lib/structures/IMigrateProgram.d.ts +6 -0
- package/lib/structures/IMigrateProgram.js +3 -0
- package/lib/structures/IMigrateProgram.js.map +1 -0
- package/lib/structures/IMigrateRoute.d.ts +19 -0
- package/lib/structures/IMigrateRoute.js +3 -0
- package/lib/structures/IMigrateRoute.js.map +1 -0
- package/lib/structures/IMigrateSchema.d.ts +4 -0
- package/lib/structures/IMigrateSchema.js +3 -0
- package/lib/structures/IMigrateSchema.js.map +1 -0
- package/lib/structures/ISwaggeSchema.d.ts +72 -0
- package/lib/structures/ISwaggeSchema.js +3 -0
- package/lib/structures/ISwaggeSchema.js.map +1 -0
- package/lib/structures/ISwagger.d.ts +22 -0
- package/lib/structures/ISwagger.js +3 -0
- package/lib/structures/ISwagger.js.map +1 -0
- package/lib/structures/ISwaggerComponents.d.ts +6 -0
- package/lib/structures/ISwaggerComponents.js +3 -0
- package/lib/structures/ISwaggerComponents.js.map +1 -0
- package/lib/structures/ISwaggerRoute.d.ts +38 -0
- package/lib/structures/ISwaggerRoute.js +3 -0
- package/lib/structures/ISwaggerRoute.js.map +1 -0
- package/lib/structures/ISwaggerSecurity.d.ts +40 -0
- package/lib/structures/ISwaggerSecurity.js +3 -0
- package/lib/structures/ISwaggerSecurity.js.map +1 -0
- package/lib/test/index.d.ts +1 -0
- package/lib/test/index.js +45 -0
- package/lib/test/index.js.map +1 -0
- package/lib/utils/JsonTypeChecker.d.ts +13 -0
- package/lib/utils/JsonTypeChecker.js +20 -0
- package/lib/utils/JsonTypeChecker.js.map +1 -0
- package/lib/utils/MapUtil.d.ts +3 -0
- package/lib/utils/MapUtil.js +15 -0
- package/lib/utils/MapUtil.js.map +1 -0
- package/lib/utils/SetupWizard.d.ts +3 -0
- package/lib/utils/SetupWizard.js +21 -0
- package/lib/utils/SetupWizard.js.map +1 -0
- package/lib/utils/StringUtil.d.ts +9 -0
- package/lib/utils/StringUtil.js +41 -0
- package/lib/utils/StringUtil.js.map +1 -0
- package/package.json +43 -0
- package/prettier.config.js +15 -0
- package/src/NestiaMigrateApplication.ts +51 -0
- package/src/archivers/FileArchiver.ts +38 -0
- package/src/bundles/TEMPLATE.ts +257 -0
- package/src/executable/bundle.ts +74 -0
- package/src/executable/migrate.ts +58 -0
- package/src/index.ts +4 -0
- package/src/module.ts +4 -0
- package/src/programmers/ControllerProgrammer.ts +159 -0
- package/src/programmers/DtoProgrammer.ts +122 -0
- package/src/programmers/MigrateProgrammer.ts +31 -0
- package/src/programmers/RouteProgrammer.ts +264 -0
- package/src/programmers/SchemaProgrammer.ts +215 -0
- package/src/structures/IMigrateController.ts +8 -0
- package/src/structures/IMigrateDto.ts +8 -0
- package/src/structures/IMigrateFile.ts +5 -0
- package/src/structures/IMigrateProgram.ts +7 -0
- package/src/structures/IMigrateRoute.ts +20 -0
- package/src/structures/IMigrateSchema.ts +4 -0
- package/src/structures/ISwaggeSchema.ts +85 -0
- package/src/structures/ISwagger.ts +24 -0
- package/src/structures/ISwaggerComponents.ts +7 -0
- package/src/structures/ISwaggerRoute.ts +42 -0
- package/src/structures/ISwaggerSecurity.ts +47 -0
- package/src/test/index.ts +38 -0
- package/src/utils/JsonTypeChecker.ts +48 -0
- package/src/utils/MapUtil.ts +13 -0
- package/src/utils/SetupWizard.ts +15 -0
- package/src/utils/StringUtil.ts +49 -0
- package/tsconfig.json +81 -0
@@ -0,0 +1,1330 @@
|
|
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.NestiaMigrateApplication = void 0;
|
16
|
+
const typia_1 = __importDefault(require("typia"));
|
17
|
+
const FileArchiver_1 = require("./archivers/FileArchiver");
|
18
|
+
const TEMPLATE_1 = require("./bundles/TEMPLATE");
|
19
|
+
const MigrateProgrammer_1 = require("./programmers/MigrateProgrammer");
|
20
|
+
class NestiaMigrateApplication {
|
21
|
+
constructor(swagger) {
|
22
|
+
this.generate = (archiver) => (output) => __awaiter(this, void 0, void 0, function* () {
|
23
|
+
const program = this.analyze();
|
24
|
+
const files = MigrateProgrammer_1.MigrateProgrammer.write(program);
|
25
|
+
yield FileArchiver_1.FileArchiver.archive(archiver)(output)([
|
26
|
+
...files,
|
27
|
+
...TEMPLATE_1.TEMPLATE,
|
28
|
+
]);
|
29
|
+
});
|
30
|
+
this.swagger = (input => {
|
31
|
+
const __is = input => {
|
32
|
+
const $join = typia_1.default.assert.join;
|
33
|
+
const $io0 = input => "string" === typeof input.openapi && RegExp(/^3\.0\.-?\d+\.?\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 && $io2(elem))) && ("object" === typeof input.components && null !== input.components && false === Array.isArray(input.components) && $io3(input.components)) && ("object" === typeof input.paths && null !== input.paths && false === Array.isArray(input.paths) && $io27(input.paths)) && (undefined === input.security || Array.isArray(input.security) && input.security.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io37(elem)));
|
34
|
+
const $io1 = input => "string" === typeof input.version && "string" === typeof input.title && (undefined === input.description || "string" === typeof input.description);
|
35
|
+
const $io2 = input => "string" === typeof input.url && (undefined === input.description || "string" === typeof input.description);
|
36
|
+
const $io3 = input => (undefined === input.schemas || "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && $io4(input.schemas)) && (undefined === input.securitySchemes || "object" === typeof input.securitySchemes && null !== input.securitySchemes && false === Array.isArray(input.securitySchemes) && $io16(input.securitySchemes));
|
37
|
+
const $io4 = input => Object.keys(input).every(key => {
|
38
|
+
const value = input[key];
|
39
|
+
if (undefined === value)
|
40
|
+
return true;
|
41
|
+
if (RegExp(/(.*)/).test(key))
|
42
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $iu0(value);
|
43
|
+
return true;
|
44
|
+
});
|
45
|
+
const $io5 = 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"]);
|
46
|
+
const $io6 = 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"]);
|
47
|
+
const $io7 = 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"]);
|
48
|
+
const $io8 = 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"]);
|
49
|
+
const $io9 = input => (undefined === input["default"] || "number" === typeof input["default"] && parseInt(input["default"]) === input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "number" === typeof elem && parseInt(elem) === elem)) && (undefined === input.minimum || "number" === typeof input.minimum && parseInt(input.minimum) === input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum && parseInt(input.maximum) === input.maximum) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && parseInt(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf) && "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"]);
|
50
|
+
const $io10 = 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"]);
|
51
|
+
const $io11 = 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 && parseInt(input.minLength) === input.minLength && 0 <= input.minLength) && (undefined === input.maxLength || "number" === typeof input.maxLength && parseInt(input.maxLength) === input.maxLength && 0 <= input.maxLength) && "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"]);
|
52
|
+
const $io12 = input => "object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) && $iu0(input.items) && (undefined === input.minItems || "number" === typeof input.minItems && parseInt(input.minItems) === input.minItems && 0 <= input.minItems) && (undefined === input.maxItems || "number" === typeof input.maxItems && parseInt(input.maxItems) === input.maxItems && 0 <= input.maxItems) && (undefined === input["x-typia-tuple"] || "object" === typeof input["x-typia-tuple"] && null !== input["x-typia-tuple"] && $io15(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"]);
|
53
|
+
const $io13 = input => "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io4(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"]) && $io4(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"]);
|
54
|
+
const $io14 = 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 $io15 = 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 $io16 = input => Object.keys(input).every(key => {
|
57
|
+
const value = input[key];
|
58
|
+
if (undefined === value)
|
59
|
+
return true;
|
60
|
+
if (RegExp(/(.*)/).test(key))
|
61
|
+
return "object" === typeof value && null !== value && $iu1(value);
|
62
|
+
return true;
|
63
|
+
});
|
64
|
+
const $io17 = input => "http" === input.type && "basic" === input.schema;
|
65
|
+
const $io18 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat);
|
66
|
+
const $io19 = input => "apiKey" === input.type && ("header" === input["in"] || "query" === input["in"] || "cookie" === input["in"]) && "string" === typeof input.name;
|
67
|
+
const $io20 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl;
|
68
|
+
const $io21 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && $io22(input.flows)) && (undefined === input.description || "string" === typeof input.description);
|
69
|
+
const $io22 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && $io23(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && $io25(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && $io26(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && $io26(input.clientCredentials));
|
70
|
+
const $io23 = input => "string" === typeof input.authorizationUrl && "string" === typeof input.tokenUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io24(input.scopes));
|
71
|
+
const $io24 = input => Object.keys(input).every(key => {
|
72
|
+
const value = input[key];
|
73
|
+
if (undefined === value)
|
74
|
+
return true;
|
75
|
+
if (RegExp(/(.*)/).test(key))
|
76
|
+
return "string" === typeof value;
|
77
|
+
return true;
|
78
|
+
});
|
79
|
+
const $io25 = input => "string" === typeof input.authorizationUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io24(input.scopes));
|
80
|
+
const $io26 = input => "string" === typeof input.tokenUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io24(input.scopes));
|
81
|
+
const $io27 = input => Object.keys(input).every(key => {
|
82
|
+
const value = input[key];
|
83
|
+
if (undefined === value)
|
84
|
+
return true;
|
85
|
+
if (RegExp(/(.*)/).test(key))
|
86
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io28(value);
|
87
|
+
return true;
|
88
|
+
});
|
89
|
+
const $io28 = input => Object.keys(input).every(key => {
|
90
|
+
const value = input[key];
|
91
|
+
if (undefined === value)
|
92
|
+
return true;
|
93
|
+
if (RegExp(/(.*)/).test(key))
|
94
|
+
return "object" === typeof value && null !== value && $io29(value);
|
95
|
+
return true;
|
96
|
+
});
|
97
|
+
const $io29 = input => Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && $io30(elem)) && (undefined === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && $io31(input.requestBody)) && ("object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) && $io35(input.responses)) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
|
98
|
+
const $io30 = input => "string" === typeof input.name && ("header" === input["in"] || "query" === input["in"] || "cookie" === input["in"] || "path" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema)) && "boolean" === typeof input.required && "string" === typeof input.description;
|
99
|
+
const $io31 = input => "string" === typeof input.description && ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && $io32(input.content)) && true === input.required && "boolean" === typeof input["x-nestia-encrypted"];
|
100
|
+
const $io32 = input => (undefined === input["text/plain"] || "object" === typeof input["text/plain"] && null !== input["text/plain"] && $io33(input["text/plain"])) && (undefined === input["application/json"] || "object" === typeof input["application/json"] && null !== input["application/json"] && $io34(input["application/json"]));
|
101
|
+
const $io33 = input => "object" === typeof input.schema && null !== input.schema && $io11(input.schema);
|
102
|
+
const $io34 = input => "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema);
|
103
|
+
const $io35 = input => Object.keys(input).every(key => {
|
104
|
+
const value = input[key];
|
105
|
+
if (undefined === value)
|
106
|
+
return true;
|
107
|
+
if (RegExp(/(.*)/).test(key))
|
108
|
+
return "object" === typeof value && null !== value && $io36(value);
|
109
|
+
return true;
|
110
|
+
});
|
111
|
+
const $io36 = input => "string" === typeof input.description && (undefined === input.content || "object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && $io32(input.content)) && (undefined === input["x-nestia-encrypted"] || "boolean" === typeof input["x-nestia-encrypted"]);
|
112
|
+
const $io37 = input => Object.keys(input).every(key => {
|
113
|
+
const value = input[key];
|
114
|
+
if (undefined === value)
|
115
|
+
return true;
|
116
|
+
if (RegExp(/(.*)/).test(key))
|
117
|
+
return Array.isArray(value) && value.every(elem => "string" === typeof elem);
|
118
|
+
return true;
|
119
|
+
});
|
120
|
+
const $iu0 = input => (() => {
|
121
|
+
if (undefined !== input.anyOf)
|
122
|
+
return $io6(input);
|
123
|
+
if (undefined !== input.oneOf)
|
124
|
+
return $io7(input);
|
125
|
+
if ("boolean" === input.type)
|
126
|
+
return $io8(input);
|
127
|
+
if ("number" === input.type)
|
128
|
+
return $io10(input);
|
129
|
+
if ("integer" === input.type)
|
130
|
+
return $io9(input);
|
131
|
+
if ("string" === input.type)
|
132
|
+
return $io11(input);
|
133
|
+
if ("array" === input.type)
|
134
|
+
return $io12(input);
|
135
|
+
if ("object" === input.type)
|
136
|
+
return $io13(input);
|
137
|
+
if (undefined !== input.$ref)
|
138
|
+
return $io14(input);
|
139
|
+
return $io5(input);
|
140
|
+
})();
|
141
|
+
const $iu1 = input => (() => {
|
142
|
+
if (undefined !== input.schema)
|
143
|
+
return $io17(input);
|
144
|
+
if (undefined !== input.scheme)
|
145
|
+
return $io18(input);
|
146
|
+
if ("apiKey" === input.type)
|
147
|
+
return $io19(input);
|
148
|
+
if ("openIdConnect" === input.type)
|
149
|
+
return $io20(input);
|
150
|
+
if ("oauth2" === input.type)
|
151
|
+
return $io21(input);
|
152
|
+
return false;
|
153
|
+
})();
|
154
|
+
return "object" === typeof input && null !== input && $io0(input);
|
155
|
+
};
|
156
|
+
if (false === __is(input))
|
157
|
+
((input, _path, _exceptionable = true) => {
|
158
|
+
const $guard = typia_1.default.assert.guard;
|
159
|
+
const $join = typia_1.default.assert.join;
|
160
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.openapi && RegExp(/^3\.0\.-?\d+\.?\d*$/).test(input.openapi) || $guard(_exceptionable, {
|
161
|
+
path: _path + ".openapi",
|
162
|
+
expected: "`3.0.${number}`",
|
163
|
+
value: input.openapi
|
164
|
+
})) && (("object" === typeof input.info && null !== input.info || $guard(_exceptionable, {
|
165
|
+
path: _path + ".info",
|
166
|
+
expected: "ISwagger.IInfo",
|
167
|
+
value: input.info
|
168
|
+
})) && $ao1(input.info, _path + ".info", true && _exceptionable) || $guard(_exceptionable, {
|
169
|
+
path: _path + ".info",
|
170
|
+
expected: "ISwagger.IInfo",
|
171
|
+
value: input.info
|
172
|
+
})) && ((Array.isArray(input.servers) || $guard(_exceptionable, {
|
173
|
+
path: _path + ".servers",
|
174
|
+
expected: "Array<ISwagger.IServer>",
|
175
|
+
value: input.servers
|
176
|
+
})) && input.servers.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
177
|
+
path: _path + ".servers[" + _index1 + "]",
|
178
|
+
expected: "ISwagger.IServer",
|
179
|
+
value: elem
|
180
|
+
})) && $ao2(elem, _path + ".servers[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
181
|
+
path: _path + ".servers[" + _index1 + "]",
|
182
|
+
expected: "ISwagger.IServer",
|
183
|
+
value: elem
|
184
|
+
})) || $guard(_exceptionable, {
|
185
|
+
path: _path + ".servers",
|
186
|
+
expected: "Array<ISwagger.IServer>",
|
187
|
+
value: input.servers
|
188
|
+
})) && (("object" === typeof input.components && null !== input.components && false === Array.isArray(input.components) || $guard(_exceptionable, {
|
189
|
+
path: _path + ".components",
|
190
|
+
expected: "ISwaggerComponents",
|
191
|
+
value: input.components
|
192
|
+
})) && $ao3(input.components, _path + ".components", true && _exceptionable) || $guard(_exceptionable, {
|
193
|
+
path: _path + ".components",
|
194
|
+
expected: "ISwaggerComponents",
|
195
|
+
value: input.components
|
196
|
+
})) && (("object" === typeof input.paths && null !== input.paths && false === Array.isArray(input.paths) || $guard(_exceptionable, {
|
197
|
+
path: _path + ".paths",
|
198
|
+
expected: "Record<string, ISwagger.IPath>",
|
199
|
+
value: input.paths
|
200
|
+
})) && $ao27(input.paths, _path + ".paths", true && _exceptionable) || $guard(_exceptionable, {
|
201
|
+
path: _path + ".paths",
|
202
|
+
expected: "Record<string, ISwagger.IPath>",
|
203
|
+
value: input.paths
|
204
|
+
})) && (undefined === input.security || (Array.isArray(input.security) || $guard(_exceptionable, {
|
205
|
+
path: _path + ".security",
|
206
|
+
expected: "(Array<Record<string, Array<string>>> | undefined)",
|
207
|
+
value: input.security
|
208
|
+
})) && input.security.every((elem, _index2) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
209
|
+
path: _path + ".security[" + _index2 + "]",
|
210
|
+
expected: "Record<string, Array<string>>",
|
211
|
+
value: elem
|
212
|
+
})) && $ao37(elem, _path + ".security[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
213
|
+
path: _path + ".security[" + _index2 + "]",
|
214
|
+
expected: "Record<string, Array<string>>",
|
215
|
+
value: elem
|
216
|
+
})) || $guard(_exceptionable, {
|
217
|
+
path: _path + ".security",
|
218
|
+
expected: "(Array<Record<string, Array<string>>> | undefined)",
|
219
|
+
value: input.security
|
220
|
+
}));
|
221
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.version || $guard(_exceptionable, {
|
222
|
+
path: _path + ".version",
|
223
|
+
expected: "string",
|
224
|
+
value: input.version
|
225
|
+
})) && ("string" === typeof input.title || $guard(_exceptionable, {
|
226
|
+
path: _path + ".title",
|
227
|
+
expected: "string",
|
228
|
+
value: input.title
|
229
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
230
|
+
path: _path + ".description",
|
231
|
+
expected: "(string | undefined)",
|
232
|
+
value: input.description
|
233
|
+
}));
|
234
|
+
const $ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.url || $guard(_exceptionable, {
|
235
|
+
path: _path + ".url",
|
236
|
+
expected: "string",
|
237
|
+
value: input.url
|
238
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
239
|
+
path: _path + ".description",
|
240
|
+
expected: "(string | undefined)",
|
241
|
+
value: input.description
|
242
|
+
}));
|
243
|
+
const $ao3 = (input, _path, _exceptionable = true) => (undefined === input.schemas || ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || $guard(_exceptionable, {
|
244
|
+
path: _path + ".schemas",
|
245
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
246
|
+
value: input.schemas
|
247
|
+
})) && $ao4(input.schemas, _path + ".schemas", true && _exceptionable) || $guard(_exceptionable, {
|
248
|
+
path: _path + ".schemas",
|
249
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
250
|
+
value: input.schemas
|
251
|
+
})) && (undefined === input.securitySchemes || ("object" === typeof input.securitySchemes && null !== input.securitySchemes && false === Array.isArray(input.securitySchemes) || $guard(_exceptionable, {
|
252
|
+
path: _path + ".securitySchemes",
|
253
|
+
expected: "(Record<string, ISwaggerSecurity> | undefined)",
|
254
|
+
value: input.securitySchemes
|
255
|
+
})) && $ao16(input.securitySchemes, _path + ".securitySchemes", true && _exceptionable) || $guard(_exceptionable, {
|
256
|
+
path: _path + ".securitySchemes",
|
257
|
+
expected: "(Record<string, ISwaggerSecurity> | undefined)",
|
258
|
+
value: input.securitySchemes
|
259
|
+
}));
|
260
|
+
const $ao4 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
261
|
+
const value = input[key];
|
262
|
+
if (undefined === value)
|
263
|
+
return true;
|
264
|
+
if (RegExp(/(.*)/).test(key))
|
265
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
266
|
+
path: _path + $join(key),
|
267
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
268
|
+
value: value
|
269
|
+
})) && $au0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
270
|
+
path: _path + $join(key),
|
271
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
272
|
+
value: value
|
273
|
+
});
|
274
|
+
return true;
|
275
|
+
});
|
276
|
+
const $ao5 = (input, _path, _exceptionable = true) => (null !== input.type || $guard(_exceptionable, {
|
277
|
+
path: _path + ".type",
|
278
|
+
expected: "undefined",
|
279
|
+
value: input.type
|
280
|
+
})) && (undefined === input.type || $guard(_exceptionable, {
|
281
|
+
path: _path + ".type",
|
282
|
+
expected: "undefined",
|
283
|
+
value: input.type
|
284
|
+
})) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
285
|
+
path: _path + ".title",
|
286
|
+
expected: "(string | undefined)",
|
287
|
+
value: input.title
|
288
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
289
|
+
path: _path + ".description",
|
290
|
+
expected: "(string | undefined)",
|
291
|
+
value: input.description
|
292
|
+
})) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
293
|
+
path: _path + ".deprecated",
|
294
|
+
expected: "(boolean | undefined)",
|
295
|
+
value: input.deprecated
|
296
|
+
})) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
297
|
+
path: _path + "[\"x-typia-optional\"]",
|
298
|
+
expected: "(boolean | undefined)",
|
299
|
+
value: input["x-typia-optional"]
|
300
|
+
})) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
301
|
+
path: _path + "[\"x-typia-rest\"]",
|
302
|
+
expected: "(boolean | undefined)",
|
303
|
+
value: input["x-typia-rest"]
|
304
|
+
}));
|
305
|
+
const $ao6 = (input, _path, _exceptionable = true) => ((Array.isArray(input.anyOf) || $guard(_exceptionable, {
|
306
|
+
path: _path + ".anyOf",
|
307
|
+
expected: "Array<ISwaggerSchema>",
|
308
|
+
value: input.anyOf
|
309
|
+
})) && input.anyOf.every((elem, _index3) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
310
|
+
path: _path + ".anyOf[" + _index3 + "]",
|
311
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
312
|
+
value: elem
|
313
|
+
})) && $au0(elem, _path + ".anyOf[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
314
|
+
path: _path + ".anyOf[" + _index3 + "]",
|
315
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
316
|
+
value: elem
|
317
|
+
})) || $guard(_exceptionable, {
|
318
|
+
path: _path + ".anyOf",
|
319
|
+
expected: "Array<ISwaggerSchema>",
|
320
|
+
value: input.anyOf
|
321
|
+
})) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
322
|
+
path: _path + ".title",
|
323
|
+
expected: "(string | undefined)",
|
324
|
+
value: input.title
|
325
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
326
|
+
path: _path + ".description",
|
327
|
+
expected: "(string | undefined)",
|
328
|
+
value: input.description
|
329
|
+
})) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
330
|
+
path: _path + ".deprecated",
|
331
|
+
expected: "(boolean | undefined)",
|
332
|
+
value: input.deprecated
|
333
|
+
})) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
334
|
+
path: _path + "[\"x-typia-optional\"]",
|
335
|
+
expected: "(boolean | undefined)",
|
336
|
+
value: input["x-typia-optional"]
|
337
|
+
})) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
338
|
+
path: _path + "[\"x-typia-rest\"]",
|
339
|
+
expected: "(boolean | undefined)",
|
340
|
+
value: input["x-typia-rest"]
|
341
|
+
}));
|
342
|
+
const $ao7 = (input, _path, _exceptionable = true) => ((Array.isArray(input.oneOf) || $guard(_exceptionable, {
|
343
|
+
path: _path + ".oneOf",
|
344
|
+
expected: "Array<ISwaggerSchema>",
|
345
|
+
value: input.oneOf
|
346
|
+
})) && input.oneOf.every((elem, _index4) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
347
|
+
path: _path + ".oneOf[" + _index4 + "]",
|
348
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
349
|
+
value: elem
|
350
|
+
})) && $au0(elem, _path + ".oneOf[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
351
|
+
path: _path + ".oneOf[" + _index4 + "]",
|
352
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
353
|
+
value: elem
|
354
|
+
})) || $guard(_exceptionable, {
|
355
|
+
path: _path + ".oneOf",
|
356
|
+
expected: "Array<ISwaggerSchema>",
|
357
|
+
value: input.oneOf
|
358
|
+
})) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
359
|
+
path: _path + ".title",
|
360
|
+
expected: "(string | undefined)",
|
361
|
+
value: input.title
|
362
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
363
|
+
path: _path + ".description",
|
364
|
+
expected: "(string | undefined)",
|
365
|
+
value: input.description
|
366
|
+
})) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
367
|
+
path: _path + ".deprecated",
|
368
|
+
expected: "(boolean | undefined)",
|
369
|
+
value: input.deprecated
|
370
|
+
})) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
371
|
+
path: _path + "[\"x-typia-optional\"]",
|
372
|
+
expected: "(boolean | undefined)",
|
373
|
+
value: input["x-typia-optional"]
|
374
|
+
})) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
375
|
+
path: _path + "[\"x-typia-rest\"]",
|
376
|
+
expected: "(boolean | undefined)",
|
377
|
+
value: input["x-typia-rest"]
|
378
|
+
}));
|
379
|
+
const $ao8 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "boolean" === typeof input["default"] || $guard(_exceptionable, {
|
380
|
+
path: _path + "[\"default\"]",
|
381
|
+
expected: "(boolean | undefined)",
|
382
|
+
value: input["default"]
|
383
|
+
})) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
384
|
+
path: _path + "[\"enum\"]",
|
385
|
+
expected: "(Array<boolean> | undefined)",
|
386
|
+
value: input["enum"]
|
387
|
+
})) && input["enum"].every((elem, _index5) => "boolean" === typeof elem || $guard(_exceptionable, {
|
388
|
+
path: _path + "[\"enum\"][" + _index5 + "]",
|
389
|
+
expected: "boolean",
|
390
|
+
value: elem
|
391
|
+
})) || $guard(_exceptionable, {
|
392
|
+
path: _path + "[\"enum\"]",
|
393
|
+
expected: "(Array<boolean> | undefined)",
|
394
|
+
value: input["enum"]
|
395
|
+
})) && ("boolean" === input.type || $guard(_exceptionable, {
|
396
|
+
path: _path + ".type",
|
397
|
+
expected: "\"boolean\"",
|
398
|
+
value: input.type
|
399
|
+
})) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
400
|
+
path: _path + ".nullable",
|
401
|
+
expected: "(boolean | undefined)",
|
402
|
+
value: input.nullable
|
403
|
+
})) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
404
|
+
path: _path + ".title",
|
405
|
+
expected: "(string | undefined)",
|
406
|
+
value: input.title
|
407
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
408
|
+
path: _path + ".description",
|
409
|
+
expected: "(string | undefined)",
|
410
|
+
value: input.description
|
411
|
+
})) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
412
|
+
path: _path + ".deprecated",
|
413
|
+
expected: "(boolean | undefined)",
|
414
|
+
value: input.deprecated
|
415
|
+
})) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
416
|
+
path: _path + "[\"x-typia-optional\"]",
|
417
|
+
expected: "(boolean | undefined)",
|
418
|
+
value: input["x-typia-optional"]
|
419
|
+
})) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
420
|
+
path: _path + "[\"x-typia-rest\"]",
|
421
|
+
expected: "(boolean | undefined)",
|
422
|
+
value: input["x-typia-rest"]
|
423
|
+
}));
|
424
|
+
const $ao9 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "number" === typeof input["default"] && (parseInt(input["default"]) === input["default"] || $guard(_exceptionable, {
|
425
|
+
path: _path + "[\"default\"]",
|
426
|
+
expected: "number (@type int)",
|
427
|
+
value: input["default"]
|
428
|
+
})) || $guard(_exceptionable, {
|
429
|
+
path: _path + "[\"default\"]",
|
430
|
+
expected: "(number | undefined)",
|
431
|
+
value: input["default"]
|
432
|
+
})) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
433
|
+
path: _path + "[\"enum\"]",
|
434
|
+
expected: "(Array<number> | undefined)",
|
435
|
+
value: input["enum"]
|
436
|
+
})) && input["enum"].every((elem, _index6) => "number" === typeof elem && (parseInt(elem) === elem || $guard(_exceptionable, {
|
437
|
+
path: _path + "[\"enum\"][" + _index6 + "]",
|
438
|
+
expected: "number (@type int)",
|
439
|
+
value: elem
|
440
|
+
})) || $guard(_exceptionable, {
|
441
|
+
path: _path + "[\"enum\"][" + _index6 + "]",
|
442
|
+
expected: "number",
|
443
|
+
value: elem
|
444
|
+
})) || $guard(_exceptionable, {
|
445
|
+
path: _path + "[\"enum\"]",
|
446
|
+
expected: "(Array<number> | undefined)",
|
447
|
+
value: input["enum"]
|
448
|
+
})) && (undefined === input.minimum || "number" === typeof input.minimum && (parseInt(input.minimum) === input.minimum || $guard(_exceptionable, {
|
449
|
+
path: _path + ".minimum",
|
450
|
+
expected: "number (@type int)",
|
451
|
+
value: input.minimum
|
452
|
+
})) || $guard(_exceptionable, {
|
453
|
+
path: _path + ".minimum",
|
454
|
+
expected: "(number | undefined)",
|
455
|
+
value: input.minimum
|
456
|
+
})) && (undefined === input.maximum || "number" === typeof input.maximum && (parseInt(input.maximum) === input.maximum || $guard(_exceptionable, {
|
457
|
+
path: _path + ".maximum",
|
458
|
+
expected: "number (@type int)",
|
459
|
+
value: input.maximum
|
460
|
+
})) || $guard(_exceptionable, {
|
461
|
+
path: _path + ".maximum",
|
462
|
+
expected: "(number | undefined)",
|
463
|
+
value: input.maximum
|
464
|
+
})) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || $guard(_exceptionable, {
|
465
|
+
path: _path + ".exclusiveMinimum",
|
466
|
+
expected: "(boolean | undefined)",
|
467
|
+
value: input.exclusiveMinimum
|
468
|
+
})) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || $guard(_exceptionable, {
|
469
|
+
path: _path + ".exclusiveMaximum",
|
470
|
+
expected: "(boolean | undefined)",
|
471
|
+
value: input.exclusiveMaximum
|
472
|
+
})) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (parseInt(input.multipleOf) === input.multipleOf || $guard(_exceptionable, {
|
473
|
+
path: _path + ".multipleOf",
|
474
|
+
expected: "number (@type uint)",
|
475
|
+
value: input.multipleOf
|
476
|
+
})) && (0 <= input.multipleOf || $guard(_exceptionable, {
|
477
|
+
path: _path + ".multipleOf",
|
478
|
+
expected: "number (@type uint)",
|
479
|
+
value: input.multipleOf
|
480
|
+
})) || $guard(_exceptionable, {
|
481
|
+
path: _path + ".multipleOf",
|
482
|
+
expected: "(number | undefined)",
|
483
|
+
value: input.multipleOf
|
484
|
+
})) && ("integer" === input.type || $guard(_exceptionable, {
|
485
|
+
path: _path + ".type",
|
486
|
+
expected: "\"integer\"",
|
487
|
+
value: input.type
|
488
|
+
})) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
489
|
+
path: _path + ".nullable",
|
490
|
+
expected: "(boolean | undefined)",
|
491
|
+
value: input.nullable
|
492
|
+
})) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
493
|
+
path: _path + ".title",
|
494
|
+
expected: "(string | undefined)",
|
495
|
+
value: input.title
|
496
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
497
|
+
path: _path + ".description",
|
498
|
+
expected: "(string | undefined)",
|
499
|
+
value: input.description
|
500
|
+
})) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
501
|
+
path: _path + ".deprecated",
|
502
|
+
expected: "(boolean | undefined)",
|
503
|
+
value: input.deprecated
|
504
|
+
})) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
505
|
+
path: _path + "[\"x-typia-optional\"]",
|
506
|
+
expected: "(boolean | undefined)",
|
507
|
+
value: input["x-typia-optional"]
|
508
|
+
})) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
509
|
+
path: _path + "[\"x-typia-rest\"]",
|
510
|
+
expected: "(boolean | undefined)",
|
511
|
+
value: input["x-typia-rest"]
|
512
|
+
}));
|
513
|
+
const $ao10 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "number" === typeof input["default"] || $guard(_exceptionable, {
|
514
|
+
path: _path + "[\"default\"]",
|
515
|
+
expected: "(number | undefined)",
|
516
|
+
value: input["default"]
|
517
|
+
})) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
518
|
+
path: _path + "[\"enum\"]",
|
519
|
+
expected: "(Array<number> | undefined)",
|
520
|
+
value: input["enum"]
|
521
|
+
})) && input["enum"].every((elem, _index7) => "number" === typeof elem || $guard(_exceptionable, {
|
522
|
+
path: _path + "[\"enum\"][" + _index7 + "]",
|
523
|
+
expected: "number",
|
524
|
+
value: elem
|
525
|
+
})) || $guard(_exceptionable, {
|
526
|
+
path: _path + "[\"enum\"]",
|
527
|
+
expected: "(Array<number> | undefined)",
|
528
|
+
value: input["enum"]
|
529
|
+
})) && (undefined === input.minimum || "number" === typeof input.minimum || $guard(_exceptionable, {
|
530
|
+
path: _path + ".minimum",
|
531
|
+
expected: "(number | undefined)",
|
532
|
+
value: input.minimum
|
533
|
+
})) && (undefined === input.maximum || "number" === typeof input.maximum || $guard(_exceptionable, {
|
534
|
+
path: _path + ".maximum",
|
535
|
+
expected: "(number | undefined)",
|
536
|
+
value: input.maximum
|
537
|
+
})) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || $guard(_exceptionable, {
|
538
|
+
path: _path + ".exclusiveMinimum",
|
539
|
+
expected: "(boolean | undefined)",
|
540
|
+
value: input.exclusiveMinimum
|
541
|
+
})) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || $guard(_exceptionable, {
|
542
|
+
path: _path + ".exclusiveMaximum",
|
543
|
+
expected: "(boolean | undefined)",
|
544
|
+
value: input.exclusiveMaximum
|
545
|
+
})) && (undefined === input.multipleOf || "number" === typeof input.multipleOf || $guard(_exceptionable, {
|
546
|
+
path: _path + ".multipleOf",
|
547
|
+
expected: "(number | undefined)",
|
548
|
+
value: input.multipleOf
|
549
|
+
})) && ("number" === input.type || $guard(_exceptionable, {
|
550
|
+
path: _path + ".type",
|
551
|
+
expected: "\"number\"",
|
552
|
+
value: input.type
|
553
|
+
})) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
554
|
+
path: _path + ".nullable",
|
555
|
+
expected: "(boolean | undefined)",
|
556
|
+
value: input.nullable
|
557
|
+
})) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
558
|
+
path: _path + ".title",
|
559
|
+
expected: "(string | undefined)",
|
560
|
+
value: input.title
|
561
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
562
|
+
path: _path + ".description",
|
563
|
+
expected: "(string | undefined)",
|
564
|
+
value: input.description
|
565
|
+
})) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
566
|
+
path: _path + ".deprecated",
|
567
|
+
expected: "(boolean | undefined)",
|
568
|
+
value: input.deprecated
|
569
|
+
})) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
570
|
+
path: _path + "[\"x-typia-optional\"]",
|
571
|
+
expected: "(boolean | undefined)",
|
572
|
+
value: input["x-typia-optional"]
|
573
|
+
})) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
574
|
+
path: _path + "[\"x-typia-rest\"]",
|
575
|
+
expected: "(boolean | undefined)",
|
576
|
+
value: input["x-typia-rest"]
|
577
|
+
}));
|
578
|
+
const $ao11 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "string" === typeof input["default"] || $guard(_exceptionable, {
|
579
|
+
path: _path + "[\"default\"]",
|
580
|
+
expected: "(string | undefined)",
|
581
|
+
value: input["default"]
|
582
|
+
})) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
583
|
+
path: _path + "[\"enum\"]",
|
584
|
+
expected: "(Array<string> | undefined)",
|
585
|
+
value: input["enum"]
|
586
|
+
})) && input["enum"].every((elem, _index8) => "string" === typeof elem || $guard(_exceptionable, {
|
587
|
+
path: _path + "[\"enum\"][" + _index8 + "]",
|
588
|
+
expected: "string",
|
589
|
+
value: elem
|
590
|
+
})) || $guard(_exceptionable, {
|
591
|
+
path: _path + "[\"enum\"]",
|
592
|
+
expected: "(Array<string> | undefined)",
|
593
|
+
value: input["enum"]
|
594
|
+
})) && (undefined === input.format || "string" === typeof input.format || $guard(_exceptionable, {
|
595
|
+
path: _path + ".format",
|
596
|
+
expected: "(string | undefined)",
|
597
|
+
value: input.format
|
598
|
+
})) && (undefined === input.pattern || "string" === typeof input.pattern || $guard(_exceptionable, {
|
599
|
+
path: _path + ".pattern",
|
600
|
+
expected: "(string | undefined)",
|
601
|
+
value: input.pattern
|
602
|
+
})) && (undefined === input.minLength || "number" === typeof input.minLength && (parseInt(input.minLength) === input.minLength || $guard(_exceptionable, {
|
603
|
+
path: _path + ".minLength",
|
604
|
+
expected: "number (@type uint)",
|
605
|
+
value: input.minLength
|
606
|
+
})) && (0 <= input.minLength || $guard(_exceptionable, {
|
607
|
+
path: _path + ".minLength",
|
608
|
+
expected: "number (@type uint)",
|
609
|
+
value: input.minLength
|
610
|
+
})) || $guard(_exceptionable, {
|
611
|
+
path: _path + ".minLength",
|
612
|
+
expected: "(number | undefined)",
|
613
|
+
value: input.minLength
|
614
|
+
})) && (undefined === input.maxLength || "number" === typeof input.maxLength && (parseInt(input.maxLength) === input.maxLength || $guard(_exceptionable, {
|
615
|
+
path: _path + ".maxLength",
|
616
|
+
expected: "number (@type uint)",
|
617
|
+
value: input.maxLength
|
618
|
+
})) && (0 <= input.maxLength || $guard(_exceptionable, {
|
619
|
+
path: _path + ".maxLength",
|
620
|
+
expected: "number (@type uint)",
|
621
|
+
value: input.maxLength
|
622
|
+
})) || $guard(_exceptionable, {
|
623
|
+
path: _path + ".maxLength",
|
624
|
+
expected: "(number | undefined)",
|
625
|
+
value: input.maxLength
|
626
|
+
})) && ("string" === input.type || $guard(_exceptionable, {
|
627
|
+
path: _path + ".type",
|
628
|
+
expected: "\"string\"",
|
629
|
+
value: input.type
|
630
|
+
})) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
631
|
+
path: _path + ".nullable",
|
632
|
+
expected: "(boolean | undefined)",
|
633
|
+
value: input.nullable
|
634
|
+
})) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
635
|
+
path: _path + ".title",
|
636
|
+
expected: "(string | undefined)",
|
637
|
+
value: input.title
|
638
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
639
|
+
path: _path + ".description",
|
640
|
+
expected: "(string | undefined)",
|
641
|
+
value: input.description
|
642
|
+
})) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
643
|
+
path: _path + ".deprecated",
|
644
|
+
expected: "(boolean | undefined)",
|
645
|
+
value: input.deprecated
|
646
|
+
})) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
647
|
+
path: _path + "[\"x-typia-optional\"]",
|
648
|
+
expected: "(boolean | undefined)",
|
649
|
+
value: input["x-typia-optional"]
|
650
|
+
})) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
651
|
+
path: _path + "[\"x-typia-rest\"]",
|
652
|
+
expected: "(boolean | undefined)",
|
653
|
+
value: input["x-typia-rest"]
|
654
|
+
}));
|
655
|
+
const $ao12 = (input, _path, _exceptionable = true) => (("object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) || $guard(_exceptionable, {
|
656
|
+
path: _path + ".items",
|
657
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
658
|
+
value: input.items
|
659
|
+
})) && $au0(input.items, _path + ".items", true && _exceptionable) || $guard(_exceptionable, {
|
660
|
+
path: _path + ".items",
|
661
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
662
|
+
value: input.items
|
663
|
+
})) && (undefined === input.minItems || "number" === typeof input.minItems && (parseInt(input.minItems) === input.minItems || $guard(_exceptionable, {
|
664
|
+
path: _path + ".minItems",
|
665
|
+
expected: "number (@type uint)",
|
666
|
+
value: input.minItems
|
667
|
+
})) && (0 <= input.minItems || $guard(_exceptionable, {
|
668
|
+
path: _path + ".minItems",
|
669
|
+
expected: "number (@type uint)",
|
670
|
+
value: input.minItems
|
671
|
+
})) || $guard(_exceptionable, {
|
672
|
+
path: _path + ".minItems",
|
673
|
+
expected: "(number | undefined)",
|
674
|
+
value: input.minItems
|
675
|
+
})) && (undefined === input.maxItems || "number" === typeof input.maxItems && (parseInt(input.maxItems) === input.maxItems || $guard(_exceptionable, {
|
676
|
+
path: _path + ".maxItems",
|
677
|
+
expected: "number (@type uint)",
|
678
|
+
value: input.maxItems
|
679
|
+
})) && (0 <= input.maxItems || $guard(_exceptionable, {
|
680
|
+
path: _path + ".maxItems",
|
681
|
+
expected: "number (@type uint)",
|
682
|
+
value: input.maxItems
|
683
|
+
})) || $guard(_exceptionable, {
|
684
|
+
path: _path + ".maxItems",
|
685
|
+
expected: "(number | undefined)",
|
686
|
+
value: input.maxItems
|
687
|
+
})) && (undefined === input["x-typia-tuple"] || ("object" === typeof input["x-typia-tuple"] && null !== input["x-typia-tuple"] || $guard(_exceptionable, {
|
688
|
+
path: _path + "[\"x-typia-tuple\"]",
|
689
|
+
expected: "(ISwaggerSchema.ITuple | undefined)",
|
690
|
+
value: input["x-typia-tuple"]
|
691
|
+
})) && $ao15(input["x-typia-tuple"], _path + "[\"x-typia-tuple\"]", true && _exceptionable) || $guard(_exceptionable, {
|
692
|
+
path: _path + "[\"x-typia-tuple\"]",
|
693
|
+
expected: "(ISwaggerSchema.ITuple | undefined)",
|
694
|
+
value: input["x-typia-tuple"]
|
695
|
+
})) && ("array" === input.type || $guard(_exceptionable, {
|
696
|
+
path: _path + ".type",
|
697
|
+
expected: "\"array\"",
|
698
|
+
value: input.type
|
699
|
+
})) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
700
|
+
path: _path + ".nullable",
|
701
|
+
expected: "(boolean | undefined)",
|
702
|
+
value: input.nullable
|
703
|
+
})) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
704
|
+
path: _path + ".title",
|
705
|
+
expected: "(string | undefined)",
|
706
|
+
value: input.title
|
707
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
708
|
+
path: _path + ".description",
|
709
|
+
expected: "(string | undefined)",
|
710
|
+
value: input.description
|
711
|
+
})) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
712
|
+
path: _path + ".deprecated",
|
713
|
+
expected: "(boolean | undefined)",
|
714
|
+
value: input.deprecated
|
715
|
+
})) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
716
|
+
path: _path + "[\"x-typia-optional\"]",
|
717
|
+
expected: "(boolean | undefined)",
|
718
|
+
value: input["x-typia-optional"]
|
719
|
+
})) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
720
|
+
path: _path + "[\"x-typia-rest\"]",
|
721
|
+
expected: "(boolean | undefined)",
|
722
|
+
value: input["x-typia-rest"]
|
723
|
+
}));
|
724
|
+
const $ao13 = (input, _path, _exceptionable = true) => (("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) || $guard(_exceptionable, {
|
725
|
+
path: _path + ".properties",
|
726
|
+
expected: "Record<string, ISwaggerSchema>",
|
727
|
+
value: input.properties
|
728
|
+
})) && $ao4(input.properties, _path + ".properties", true && _exceptionable) || $guard(_exceptionable, {
|
729
|
+
path: _path + ".properties",
|
730
|
+
expected: "Record<string, ISwaggerSchema>",
|
731
|
+
value: input.properties
|
732
|
+
})) && (undefined === input.required || (Array.isArray(input.required) || $guard(_exceptionable, {
|
733
|
+
path: _path + ".required",
|
734
|
+
expected: "(Array<string> | undefined)",
|
735
|
+
value: input.required
|
736
|
+
})) && input.required.every((elem, _index9) => "string" === typeof elem || $guard(_exceptionable, {
|
737
|
+
path: _path + ".required[" + _index9 + "]",
|
738
|
+
expected: "string",
|
739
|
+
value: elem
|
740
|
+
})) || $guard(_exceptionable, {
|
741
|
+
path: _path + ".required",
|
742
|
+
expected: "(Array<string> | undefined)",
|
743
|
+
value: input.required
|
744
|
+
})) && ((null !== input.additionalProperties || $guard(_exceptionable, {
|
745
|
+
path: _path + ".additionalProperties",
|
746
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | boolean | undefined)",
|
747
|
+
value: input.additionalProperties
|
748
|
+
})) && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || ("object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) || $guard(_exceptionable, {
|
749
|
+
path: _path + ".additionalProperties",
|
750
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | boolean | undefined)",
|
751
|
+
value: input.additionalProperties
|
752
|
+
})) && $au0(input.additionalProperties, _path + ".additionalProperties", true && _exceptionable) || $guard(_exceptionable, {
|
753
|
+
path: _path + ".additionalProperties",
|
754
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | boolean | undefined)",
|
755
|
+
value: input.additionalProperties
|
756
|
+
}))) && (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, {
|
757
|
+
path: _path + "[\"x-typia-patternProperties\"]",
|
758
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
759
|
+
value: input["x-typia-patternProperties"]
|
760
|
+
})) && $ao4(input["x-typia-patternProperties"], _path + "[\"x-typia-patternProperties\"]", true && _exceptionable) || $guard(_exceptionable, {
|
761
|
+
path: _path + "[\"x-typia-patternProperties\"]",
|
762
|
+
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
763
|
+
value: input["x-typia-patternProperties"]
|
764
|
+
})) && ("object" === input.type || $guard(_exceptionable, {
|
765
|
+
path: _path + ".type",
|
766
|
+
expected: "\"object\"",
|
767
|
+
value: input.type
|
768
|
+
})) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
769
|
+
path: _path + ".nullable",
|
770
|
+
expected: "(boolean | undefined)",
|
771
|
+
value: input.nullable
|
772
|
+
})) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
773
|
+
path: _path + ".title",
|
774
|
+
expected: "(string | undefined)",
|
775
|
+
value: input.title
|
776
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
777
|
+
path: _path + ".description",
|
778
|
+
expected: "(string | undefined)",
|
779
|
+
value: input.description
|
780
|
+
})) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
781
|
+
path: _path + ".deprecated",
|
782
|
+
expected: "(boolean | undefined)",
|
783
|
+
value: input.deprecated
|
784
|
+
})) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
785
|
+
path: _path + "[\"x-typia-optional\"]",
|
786
|
+
expected: "(boolean | undefined)",
|
787
|
+
value: input["x-typia-optional"]
|
788
|
+
})) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
789
|
+
path: _path + "[\"x-typia-rest\"]",
|
790
|
+
expected: "(boolean | undefined)",
|
791
|
+
value: input["x-typia-rest"]
|
792
|
+
}));
|
793
|
+
const $ao14 = (input, _path, _exceptionable = true) => ("string" === typeof input.$ref || $guard(_exceptionable, {
|
794
|
+
path: _path + ".$ref",
|
795
|
+
expected: "string",
|
796
|
+
value: input.$ref
|
797
|
+
})) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
798
|
+
path: _path + ".title",
|
799
|
+
expected: "(string | undefined)",
|
800
|
+
value: input.title
|
801
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
802
|
+
path: _path + ".description",
|
803
|
+
expected: "(string | undefined)",
|
804
|
+
value: input.description
|
805
|
+
})) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
806
|
+
path: _path + ".deprecated",
|
807
|
+
expected: "(boolean | undefined)",
|
808
|
+
value: input.deprecated
|
809
|
+
})) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
810
|
+
path: _path + "[\"x-typia-optional\"]",
|
811
|
+
expected: "(boolean | undefined)",
|
812
|
+
value: input["x-typia-optional"]
|
813
|
+
})) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
814
|
+
path: _path + "[\"x-typia-rest\"]",
|
815
|
+
expected: "(boolean | undefined)",
|
816
|
+
value: input["x-typia-rest"]
|
817
|
+
}));
|
818
|
+
const $ao15 = (input, _path, _exceptionable = true) => ((Array.isArray(input.items) || $guard(_exceptionable, {
|
819
|
+
path: _path + ".items",
|
820
|
+
expected: "Array<ISwaggerSchema>",
|
821
|
+
value: input.items
|
822
|
+
})) && input.items.every((elem, _index10) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
823
|
+
path: _path + ".items[" + _index10 + "]",
|
824
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
825
|
+
value: elem
|
826
|
+
})) && $au0(elem, _path + ".items[" + _index10 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
827
|
+
path: _path + ".items[" + _index10 + "]",
|
828
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
829
|
+
value: elem
|
830
|
+
})) || $guard(_exceptionable, {
|
831
|
+
path: _path + ".items",
|
832
|
+
expected: "Array<ISwaggerSchema>",
|
833
|
+
value: input.items
|
834
|
+
})) && ("array" === input.type || $guard(_exceptionable, {
|
835
|
+
path: _path + ".type",
|
836
|
+
expected: "\"array\"",
|
837
|
+
value: input.type
|
838
|
+
})) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
839
|
+
path: _path + ".nullable",
|
840
|
+
expected: "(boolean | undefined)",
|
841
|
+
value: input.nullable
|
842
|
+
})) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
843
|
+
path: _path + ".title",
|
844
|
+
expected: "(string | undefined)",
|
845
|
+
value: input.title
|
846
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
847
|
+
path: _path + ".description",
|
848
|
+
expected: "(string | undefined)",
|
849
|
+
value: input.description
|
850
|
+
})) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
851
|
+
path: _path + ".deprecated",
|
852
|
+
expected: "(boolean | undefined)",
|
853
|
+
value: input.deprecated
|
854
|
+
})) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
855
|
+
path: _path + "[\"x-typia-optional\"]",
|
856
|
+
expected: "(boolean | undefined)",
|
857
|
+
value: input["x-typia-optional"]
|
858
|
+
})) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
859
|
+
path: _path + "[\"x-typia-rest\"]",
|
860
|
+
expected: "(boolean | undefined)",
|
861
|
+
value: input["x-typia-rest"]
|
862
|
+
}));
|
863
|
+
const $ao16 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
864
|
+
const value = input[key];
|
865
|
+
if (undefined === value)
|
866
|
+
return true;
|
867
|
+
if (RegExp(/(.*)/).test(key))
|
868
|
+
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
869
|
+
path: _path + $join(key),
|
870
|
+
expected: "(ISwaggerSecurity.IApiKey | ISwaggerSecurity.IHttpBasic | ISwaggerSecurity.IHttpBearer | ISwaggerSecurity.IOAuth2 | ISwaggerSecurity.IOpenId)",
|
871
|
+
value: value
|
872
|
+
})) && $au1(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
873
|
+
path: _path + $join(key),
|
874
|
+
expected: "(ISwaggerSecurity.IApiKey | ISwaggerSecurity.IHttpBasic | ISwaggerSecurity.IHttpBearer | ISwaggerSecurity.IOAuth2 | ISwaggerSecurity.IOpenId)",
|
875
|
+
value: value
|
876
|
+
});
|
877
|
+
return true;
|
878
|
+
});
|
879
|
+
const $ao17 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
880
|
+
path: _path + ".type",
|
881
|
+
expected: "\"http\"",
|
882
|
+
value: input.type
|
883
|
+
})) && ("basic" === input.schema || $guard(_exceptionable, {
|
884
|
+
path: _path + ".schema",
|
885
|
+
expected: "\"basic\"",
|
886
|
+
value: input.schema
|
887
|
+
}));
|
888
|
+
const $ao18 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
889
|
+
path: _path + ".type",
|
890
|
+
expected: "\"http\"",
|
891
|
+
value: input.type
|
892
|
+
})) && ("bearer" === input.scheme || $guard(_exceptionable, {
|
893
|
+
path: _path + ".scheme",
|
894
|
+
expected: "\"bearer\"",
|
895
|
+
value: input.scheme
|
896
|
+
})) && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat || $guard(_exceptionable, {
|
897
|
+
path: _path + ".bearerFormat",
|
898
|
+
expected: "(string | undefined)",
|
899
|
+
value: input.bearerFormat
|
900
|
+
}));
|
901
|
+
const $ao19 = (input, _path, _exceptionable = true) => ("apiKey" === input.type || $guard(_exceptionable, {
|
902
|
+
path: _path + ".type",
|
903
|
+
expected: "\"apiKey\"",
|
904
|
+
value: input.type
|
905
|
+
})) && ("header" === input["in"] || "query" === input["in"] || "cookie" === input["in"] || $guard(_exceptionable, {
|
906
|
+
path: _path + "[\"in\"]",
|
907
|
+
expected: "(\"cookie\" | \"header\" | \"query\")",
|
908
|
+
value: input["in"]
|
909
|
+
})) && ("string" === typeof input.name || $guard(_exceptionable, {
|
910
|
+
path: _path + ".name",
|
911
|
+
expected: "string",
|
912
|
+
value: input.name
|
913
|
+
}));
|
914
|
+
const $ao20 = (input, _path, _exceptionable = true) => ("openIdConnect" === input.type || $guard(_exceptionable, {
|
915
|
+
path: _path + ".type",
|
916
|
+
expected: "\"openIdConnect\"",
|
917
|
+
value: input.type
|
918
|
+
})) && ("string" === typeof input.openIdConnectUrl || $guard(_exceptionable, {
|
919
|
+
path: _path + ".openIdConnectUrl",
|
920
|
+
expected: "string",
|
921
|
+
value: input.openIdConnectUrl
|
922
|
+
}));
|
923
|
+
const $ao21 = (input, _path, _exceptionable = true) => ("oauth2" === input.type || $guard(_exceptionable, {
|
924
|
+
path: _path + ".type",
|
925
|
+
expected: "\"oauth2\"",
|
926
|
+
value: input.type
|
927
|
+
})) && (("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) || $guard(_exceptionable, {
|
928
|
+
path: _path + ".flows",
|
929
|
+
expected: "ISwaggerSecurity.IOAuth2.IFlowSet",
|
930
|
+
value: input.flows
|
931
|
+
})) && $ao22(input.flows, _path + ".flows", true && _exceptionable) || $guard(_exceptionable, {
|
932
|
+
path: _path + ".flows",
|
933
|
+
expected: "ISwaggerSecurity.IOAuth2.IFlowSet",
|
934
|
+
value: input.flows
|
935
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
936
|
+
path: _path + ".description",
|
937
|
+
expected: "(string | undefined)",
|
938
|
+
value: input.description
|
939
|
+
}));
|
940
|
+
const $ao22 = (input, _path, _exceptionable = true) => (undefined === input.authorizationCode || ("object" === typeof input.authorizationCode && null !== input.authorizationCode || $guard(_exceptionable, {
|
941
|
+
path: _path + ".authorizationCode",
|
942
|
+
expected: "(ISwaggerSecurity.IOAuth2.IFlow | undefined)",
|
943
|
+
value: input.authorizationCode
|
944
|
+
})) && $ao23(input.authorizationCode, _path + ".authorizationCode", true && _exceptionable) || $guard(_exceptionable, {
|
945
|
+
path: _path + ".authorizationCode",
|
946
|
+
expected: "(ISwaggerSecurity.IOAuth2.IFlow | undefined)",
|
947
|
+
value: input.authorizationCode
|
948
|
+
})) && (undefined === input.implicit || ("object" === typeof input.implicit && null !== input.implicit || $guard(_exceptionable, {
|
949
|
+
path: _path + ".implicit",
|
950
|
+
expected: "(Omit<ISwaggerSecurity.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
951
|
+
value: input.implicit
|
952
|
+
})) && $ao25(input.implicit, _path + ".implicit", true && _exceptionable) || $guard(_exceptionable, {
|
953
|
+
path: _path + ".implicit",
|
954
|
+
expected: "(Omit<ISwaggerSecurity.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
955
|
+
value: input.implicit
|
956
|
+
})) && (undefined === input.password || ("object" === typeof input.password && null !== input.password || $guard(_exceptionable, {
|
957
|
+
path: _path + ".password",
|
958
|
+
expected: "(Omit<ISwaggerSecurity.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
959
|
+
value: input.password
|
960
|
+
})) && $ao26(input.password, _path + ".password", true && _exceptionable) || $guard(_exceptionable, {
|
961
|
+
path: _path + ".password",
|
962
|
+
expected: "(Omit<ISwaggerSecurity.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
963
|
+
value: input.password
|
964
|
+
})) && (undefined === input.clientCredentials || ("object" === typeof input.clientCredentials && null !== input.clientCredentials || $guard(_exceptionable, {
|
965
|
+
path: _path + ".clientCredentials",
|
966
|
+
expected: "(Omit<ISwaggerSecurity.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
967
|
+
value: input.clientCredentials
|
968
|
+
})) && $ao26(input.clientCredentials, _path + ".clientCredentials", true && _exceptionable) || $guard(_exceptionable, {
|
969
|
+
path: _path + ".clientCredentials",
|
970
|
+
expected: "(Omit<ISwaggerSecurity.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
971
|
+
value: input.clientCredentials
|
972
|
+
}));
|
973
|
+
const $ao23 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
974
|
+
path: _path + ".authorizationUrl",
|
975
|
+
expected: "string",
|
976
|
+
value: input.authorizationUrl
|
977
|
+
})) && ("string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
978
|
+
path: _path + ".tokenUrl",
|
979
|
+
expected: "string",
|
980
|
+
value: input.tokenUrl
|
981
|
+
})) && ("string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
982
|
+
path: _path + ".refreshUrl",
|
983
|
+
expected: "string",
|
984
|
+
value: input.refreshUrl
|
985
|
+
})) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
986
|
+
path: _path + ".scopes",
|
987
|
+
expected: "(Record<string, string> | undefined)",
|
988
|
+
value: input.scopes
|
989
|
+
})) && $ao24(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
990
|
+
path: _path + ".scopes",
|
991
|
+
expected: "(Record<string, string> | undefined)",
|
992
|
+
value: input.scopes
|
993
|
+
}));
|
994
|
+
const $ao24 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
995
|
+
const value = input[key];
|
996
|
+
if (undefined === value)
|
997
|
+
return true;
|
998
|
+
if (RegExp(/(.*)/).test(key))
|
999
|
+
return "string" === typeof value || $guard(_exceptionable, {
|
1000
|
+
path: _path + $join(key),
|
1001
|
+
expected: "string",
|
1002
|
+
value: value
|
1003
|
+
});
|
1004
|
+
return true;
|
1005
|
+
});
|
1006
|
+
const $ao25 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
1007
|
+
path: _path + ".authorizationUrl",
|
1008
|
+
expected: "string",
|
1009
|
+
value: input.authorizationUrl
|
1010
|
+
})) && ("string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
1011
|
+
path: _path + ".refreshUrl",
|
1012
|
+
expected: "string",
|
1013
|
+
value: input.refreshUrl
|
1014
|
+
})) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
1015
|
+
path: _path + ".scopes",
|
1016
|
+
expected: "(Record<string, string> | undefined)",
|
1017
|
+
value: input.scopes
|
1018
|
+
})) && $ao24(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
1019
|
+
path: _path + ".scopes",
|
1020
|
+
expected: "(Record<string, string> | undefined)",
|
1021
|
+
value: input.scopes
|
1022
|
+
}));
|
1023
|
+
const $ao26 = (input, _path, _exceptionable = true) => ("string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
1024
|
+
path: _path + ".tokenUrl",
|
1025
|
+
expected: "string",
|
1026
|
+
value: input.tokenUrl
|
1027
|
+
})) && ("string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
1028
|
+
path: _path + ".refreshUrl",
|
1029
|
+
expected: "string",
|
1030
|
+
value: input.refreshUrl
|
1031
|
+
})) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
1032
|
+
path: _path + ".scopes",
|
1033
|
+
expected: "(Record<string, string> | undefined)",
|
1034
|
+
value: input.scopes
|
1035
|
+
})) && $ao24(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
1036
|
+
path: _path + ".scopes",
|
1037
|
+
expected: "(Record<string, string> | undefined)",
|
1038
|
+
value: input.scopes
|
1039
|
+
}));
|
1040
|
+
const $ao27 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1041
|
+
const value = input[key];
|
1042
|
+
if (undefined === value)
|
1043
|
+
return true;
|
1044
|
+
if (RegExp(/(.*)/).test(key))
|
1045
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
1046
|
+
path: _path + $join(key),
|
1047
|
+
expected: "ISwagger.IPath",
|
1048
|
+
value: value
|
1049
|
+
})) && $ao28(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1050
|
+
path: _path + $join(key),
|
1051
|
+
expected: "ISwagger.IPath",
|
1052
|
+
value: value
|
1053
|
+
});
|
1054
|
+
return true;
|
1055
|
+
});
|
1056
|
+
const $ao28 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1057
|
+
const value = input[key];
|
1058
|
+
if (undefined === value)
|
1059
|
+
return true;
|
1060
|
+
if (RegExp(/(.*)/).test(key))
|
1061
|
+
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
1062
|
+
path: _path + $join(key),
|
1063
|
+
expected: "ISwaggerRoute",
|
1064
|
+
value: value
|
1065
|
+
})) && $ao29(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1066
|
+
path: _path + $join(key),
|
1067
|
+
expected: "ISwaggerRoute",
|
1068
|
+
value: value
|
1069
|
+
});
|
1070
|
+
return true;
|
1071
|
+
});
|
1072
|
+
const $ao29 = (input, _path, _exceptionable = true) => ((Array.isArray(input.parameters) || $guard(_exceptionable, {
|
1073
|
+
path: _path + ".parameters",
|
1074
|
+
expected: "Array<ISwaggerRoute.IParameter>",
|
1075
|
+
value: input.parameters
|
1076
|
+
})) && input.parameters.every((elem, _index11) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
1077
|
+
path: _path + ".parameters[" + _index11 + "]",
|
1078
|
+
expected: "ISwaggerRoute.IParameter",
|
1079
|
+
value: elem
|
1080
|
+
})) && $ao30(elem, _path + ".parameters[" + _index11 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1081
|
+
path: _path + ".parameters[" + _index11 + "]",
|
1082
|
+
expected: "ISwaggerRoute.IParameter",
|
1083
|
+
value: elem
|
1084
|
+
})) || $guard(_exceptionable, {
|
1085
|
+
path: _path + ".parameters",
|
1086
|
+
expected: "Array<ISwaggerRoute.IParameter>",
|
1087
|
+
value: input.parameters
|
1088
|
+
})) && (undefined === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody || $guard(_exceptionable, {
|
1089
|
+
path: _path + ".requestBody",
|
1090
|
+
expected: "(ISwaggerRoute.IRequestBody | undefined)",
|
1091
|
+
value: input.requestBody
|
1092
|
+
})) && $ao31(input.requestBody, _path + ".requestBody", true && _exceptionable) || $guard(_exceptionable, {
|
1093
|
+
path: _path + ".requestBody",
|
1094
|
+
expected: "(ISwaggerRoute.IRequestBody | undefined)",
|
1095
|
+
value: input.requestBody
|
1096
|
+
})) && (("object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) || $guard(_exceptionable, {
|
1097
|
+
path: _path + ".responses",
|
1098
|
+
expected: "ISwaggerRoute.IResponseBody",
|
1099
|
+
value: input.responses
|
1100
|
+
})) && $ao35(input.responses, _path + ".responses", true && _exceptionable) || $guard(_exceptionable, {
|
1101
|
+
path: _path + ".responses",
|
1102
|
+
expected: "ISwaggerRoute.IResponseBody",
|
1103
|
+
value: input.responses
|
1104
|
+
})) && (undefined === input.summary || "string" === typeof input.summary || $guard(_exceptionable, {
|
1105
|
+
path: _path + ".summary",
|
1106
|
+
expected: "(string | undefined)",
|
1107
|
+
value: input.summary
|
1108
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1109
|
+
path: _path + ".description",
|
1110
|
+
expected: "(string | undefined)",
|
1111
|
+
value: input.description
|
1112
|
+
})) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
1113
|
+
path: _path + ".deprecated",
|
1114
|
+
expected: "(boolean | undefined)",
|
1115
|
+
value: input.deprecated
|
1116
|
+
})) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
|
1117
|
+
path: _path + ".tags",
|
1118
|
+
expected: "Array<string>",
|
1119
|
+
value: input.tags
|
1120
|
+
})) && input.tags.every((elem, _index12) => "string" === typeof elem || $guard(_exceptionable, {
|
1121
|
+
path: _path + ".tags[" + _index12 + "]",
|
1122
|
+
expected: "string",
|
1123
|
+
value: elem
|
1124
|
+
})) || $guard(_exceptionable, {
|
1125
|
+
path: _path + ".tags",
|
1126
|
+
expected: "Array<string>",
|
1127
|
+
value: input.tags
|
1128
|
+
}));
|
1129
|
+
const $ao30 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
|
1130
|
+
path: _path + ".name",
|
1131
|
+
expected: "string",
|
1132
|
+
value: input.name
|
1133
|
+
})) && ("header" === input["in"] || "query" === input["in"] || "cookie" === input["in"] || "path" === input["in"] || $guard(_exceptionable, {
|
1134
|
+
path: _path + "[\"in\"]",
|
1135
|
+
expected: "(\"cookie\" | \"header\" | \"path\" | \"query\")",
|
1136
|
+
value: input["in"]
|
1137
|
+
})) && (("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $guard(_exceptionable, {
|
1138
|
+
path: _path + ".schema",
|
1139
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1140
|
+
value: input.schema
|
1141
|
+
})) && $au0(input.schema, _path + ".schema", true && _exceptionable) || $guard(_exceptionable, {
|
1142
|
+
path: _path + ".schema",
|
1143
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1144
|
+
value: input.schema
|
1145
|
+
})) && ("boolean" === typeof input.required || $guard(_exceptionable, {
|
1146
|
+
path: _path + ".required",
|
1147
|
+
expected: "boolean",
|
1148
|
+
value: input.required
|
1149
|
+
})) && ("string" === typeof input.description || $guard(_exceptionable, {
|
1150
|
+
path: _path + ".description",
|
1151
|
+
expected: "string",
|
1152
|
+
value: input.description
|
1153
|
+
}));
|
1154
|
+
const $ao31 = (input, _path, _exceptionable = true) => ("string" === typeof input.description || $guard(_exceptionable, {
|
1155
|
+
path: _path + ".description",
|
1156
|
+
expected: "string",
|
1157
|
+
value: input.description
|
1158
|
+
})) && (("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) || $guard(_exceptionable, {
|
1159
|
+
path: _path + ".content",
|
1160
|
+
expected: "ISwaggerRoute.IContent",
|
1161
|
+
value: input.content
|
1162
|
+
})) && $ao32(input.content, _path + ".content", true && _exceptionable) || $guard(_exceptionable, {
|
1163
|
+
path: _path + ".content",
|
1164
|
+
expected: "ISwaggerRoute.IContent",
|
1165
|
+
value: input.content
|
1166
|
+
})) && (true === input.required || $guard(_exceptionable, {
|
1167
|
+
path: _path + ".required",
|
1168
|
+
expected: "true",
|
1169
|
+
value: input.required
|
1170
|
+
})) && ("boolean" === typeof input["x-nestia-encrypted"] || $guard(_exceptionable, {
|
1171
|
+
path: _path + "[\"x-nestia-encrypted\"]",
|
1172
|
+
expected: "boolean",
|
1173
|
+
value: input["x-nestia-encrypted"]
|
1174
|
+
}));
|
1175
|
+
const $ao32 = (input, _path, _exceptionable = true) => (undefined === input["text/plain"] || ("object" === typeof input["text/plain"] && null !== input["text/plain"] || $guard(_exceptionable, {
|
1176
|
+
path: _path + "[\"text/plain\"]",
|
1177
|
+
expected: "(__type | undefined)",
|
1178
|
+
value: input["text/plain"]
|
1179
|
+
})) && $ao33(input["text/plain"], _path + "[\"text/plain\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1180
|
+
path: _path + "[\"text/plain\"]",
|
1181
|
+
expected: "(__type | undefined)",
|
1182
|
+
value: input["text/plain"]
|
1183
|
+
})) && (undefined === input["application/json"] || ("object" === typeof input["application/json"] && null !== input["application/json"] || $guard(_exceptionable, {
|
1184
|
+
path: _path + "[\"application/json\"]",
|
1185
|
+
expected: "(__type.o1 | undefined)",
|
1186
|
+
value: input["application/json"]
|
1187
|
+
})) && $ao34(input["application/json"], _path + "[\"application/json\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1188
|
+
path: _path + "[\"application/json\"]",
|
1189
|
+
expected: "(__type.o1 | undefined)",
|
1190
|
+
value: input["application/json"]
|
1191
|
+
}));
|
1192
|
+
const $ao33 = (input, _path, _exceptionable = true) => ("object" === typeof input.schema && null !== input.schema || $guard(_exceptionable, {
|
1193
|
+
path: _path + ".schema",
|
1194
|
+
expected: "ISwaggerSchema.IString",
|
1195
|
+
value: input.schema
|
1196
|
+
})) && $ao11(input.schema, _path + ".schema", true && _exceptionable) || $guard(_exceptionable, {
|
1197
|
+
path: _path + ".schema",
|
1198
|
+
expected: "ISwaggerSchema.IString",
|
1199
|
+
value: input.schema
|
1200
|
+
});
|
1201
|
+
const $ao34 = (input, _path, _exceptionable = true) => ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $guard(_exceptionable, {
|
1202
|
+
path: _path + ".schema",
|
1203
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1204
|
+
value: input.schema
|
1205
|
+
})) && $au0(input.schema, _path + ".schema", true && _exceptionable) || $guard(_exceptionable, {
|
1206
|
+
path: _path + ".schema",
|
1207
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1208
|
+
value: input.schema
|
1209
|
+
});
|
1210
|
+
const $ao35 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1211
|
+
const value = input[key];
|
1212
|
+
if (undefined === value)
|
1213
|
+
return true;
|
1214
|
+
if (RegExp(/(.*)/).test(key))
|
1215
|
+
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
1216
|
+
path: _path + $join(key),
|
1217
|
+
expected: "__type.o2",
|
1218
|
+
value: value
|
1219
|
+
})) && $ao36(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1220
|
+
path: _path + $join(key),
|
1221
|
+
expected: "__type.o2",
|
1222
|
+
value: value
|
1223
|
+
});
|
1224
|
+
return true;
|
1225
|
+
});
|
1226
|
+
const $ao36 = (input, _path, _exceptionable = true) => ("string" === typeof input.description || $guard(_exceptionable, {
|
1227
|
+
path: _path + ".description",
|
1228
|
+
expected: "string",
|
1229
|
+
value: input.description
|
1230
|
+
})) && (undefined === input.content || ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) || $guard(_exceptionable, {
|
1231
|
+
path: _path + ".content",
|
1232
|
+
expected: "(ISwaggerRoute.IContent | undefined)",
|
1233
|
+
value: input.content
|
1234
|
+
})) && $ao32(input.content, _path + ".content", true && _exceptionable) || $guard(_exceptionable, {
|
1235
|
+
path: _path + ".content",
|
1236
|
+
expected: "(ISwaggerRoute.IContent | undefined)",
|
1237
|
+
value: input.content
|
1238
|
+
})) && (undefined === input["x-nestia-encrypted"] || "boolean" === typeof input["x-nestia-encrypted"] || $guard(_exceptionable, {
|
1239
|
+
path: _path + "[\"x-nestia-encrypted\"]",
|
1240
|
+
expected: "(boolean | undefined)",
|
1241
|
+
value: input["x-nestia-encrypted"]
|
1242
|
+
}));
|
1243
|
+
const $ao37 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1244
|
+
const value = input[key];
|
1245
|
+
if (undefined === value)
|
1246
|
+
return true;
|
1247
|
+
if (RegExp(/(.*)/).test(key))
|
1248
|
+
return (Array.isArray(value) || $guard(_exceptionable, {
|
1249
|
+
path: _path + $join(key),
|
1250
|
+
expected: "Array<string>",
|
1251
|
+
value: value
|
1252
|
+
})) && value.every((elem, _index13) => "string" === typeof elem || $guard(_exceptionable, {
|
1253
|
+
path: _path + $join(key) + "[" + _index13 + "]",
|
1254
|
+
expected: "string",
|
1255
|
+
value: elem
|
1256
|
+
})) || $guard(_exceptionable, {
|
1257
|
+
path: _path + $join(key),
|
1258
|
+
expected: "Array<string>",
|
1259
|
+
value: value
|
1260
|
+
});
|
1261
|
+
return true;
|
1262
|
+
});
|
1263
|
+
const $au0 = (input, _path, _exceptionable = true) => (() => {
|
1264
|
+
if (undefined !== input.anyOf)
|
1265
|
+
return $ao6(input, _path, true && _exceptionable);
|
1266
|
+
if (undefined !== input.oneOf)
|
1267
|
+
return $ao7(input, _path, true && _exceptionable);
|
1268
|
+
if ("boolean" === input.type)
|
1269
|
+
return $ao8(input, _path, true && _exceptionable);
|
1270
|
+
if ("number" === input.type)
|
1271
|
+
return $ao10(input, _path, true && _exceptionable);
|
1272
|
+
if ("integer" === input.type)
|
1273
|
+
return $ao9(input, _path, true && _exceptionable);
|
1274
|
+
if ("string" === input.type)
|
1275
|
+
return $ao11(input, _path, true && _exceptionable);
|
1276
|
+
if ("array" === input.type)
|
1277
|
+
return $ao12(input, _path, true && _exceptionable);
|
1278
|
+
if ("object" === input.type)
|
1279
|
+
return $ao13(input, _path, true && _exceptionable);
|
1280
|
+
if (undefined !== input.$ref)
|
1281
|
+
return $ao14(input, _path, true && _exceptionable);
|
1282
|
+
return $ao5(input, _path, true && _exceptionable);
|
1283
|
+
})();
|
1284
|
+
const $au1 = (input, _path, _exceptionable = true) => (() => {
|
1285
|
+
if (undefined !== input.schema)
|
1286
|
+
return $ao17(input, _path, true && _exceptionable);
|
1287
|
+
if (undefined !== input.scheme)
|
1288
|
+
return $ao18(input, _path, true && _exceptionable);
|
1289
|
+
if ("apiKey" === input.type)
|
1290
|
+
return $ao19(input, _path, true && _exceptionable);
|
1291
|
+
if ("openIdConnect" === input.type)
|
1292
|
+
return $ao20(input, _path, true && _exceptionable);
|
1293
|
+
if ("oauth2" === input.type)
|
1294
|
+
return $ao21(input, _path, true && _exceptionable);
|
1295
|
+
return $guard(_exceptionable, {
|
1296
|
+
path: _path,
|
1297
|
+
expected: "(ISwaggerSecurity.IHttpBasic | ISwaggerSecurity.IHttpBearer | ISwaggerSecurity.IApiKey | ISwaggerSecurity.IOpenId | ISwaggerSecurity.IOAuth2)",
|
1298
|
+
value: input
|
1299
|
+
});
|
1300
|
+
})();
|
1301
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
1302
|
+
path: _path + "",
|
1303
|
+
expected: "ISwagger",
|
1304
|
+
value: input
|
1305
|
+
})) && $ao0(input, _path + "", true) || $guard(true, {
|
1306
|
+
path: _path + "",
|
1307
|
+
expected: "ISwagger",
|
1308
|
+
value: input
|
1309
|
+
});
|
1310
|
+
})(input, "$input", true);
|
1311
|
+
return input;
|
1312
|
+
})(swagger);
|
1313
|
+
this.program = null;
|
1314
|
+
this.files = null;
|
1315
|
+
}
|
1316
|
+
analyze() {
|
1317
|
+
if (this.program === null)
|
1318
|
+
this.program = MigrateProgrammer_1.MigrateProgrammer.analyze(this.swagger);
|
1319
|
+
return this.program;
|
1320
|
+
}
|
1321
|
+
write() {
|
1322
|
+
if (this.files === null) {
|
1323
|
+
const program = this.analyze();
|
1324
|
+
this.files = MigrateProgrammer_1.MigrateProgrammer.write(program);
|
1325
|
+
}
|
1326
|
+
return this.files;
|
1327
|
+
}
|
1328
|
+
}
|
1329
|
+
exports.NestiaMigrateApplication = NestiaMigrateApplication;
|
1330
|
+
//# sourceMappingURL=NestiaMigrateApplication.js.map
|