@nestia/migrate 0.12.1 → 0.13.0-dev.20240411-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/MigrateApplication.d.ts +3 -4
- package/lib/MigrateApplication.js +5157 -948
- package/lib/MigrateApplication.js.map +1 -1
- package/lib/analyzers/MigrateControllerAnalyzer.js +2 -1
- package/lib/analyzers/MigrateControllerAnalyzer.js.map +1 -1
- package/lib/analyzers/MigrateMethodAnalyzer.d.ts +2 -2
- package/lib/analyzers/MigrateMethodAnalyzer.js +60 -143
- package/lib/analyzers/MigrateMethodAnalyzer.js.map +1 -1
- package/lib/bundles/NEST_TEMPLATE.js +1 -1
- package/lib/factories/TypeLiteralFactory.js +3 -1
- package/lib/factories/TypeLiteralFactory.js.map +1 -1
- package/lib/internal/MigrateCommander.js +2 -2
- package/lib/internal/MigrateCommander.js.map +1 -1
- package/lib/module.d.ts +0 -6
- package/lib/module.js +0 -6
- package/lib/module.js.map +1 -1
- package/lib/programmers/MigrateApiFileProgrammer.d.ts +2 -2
- package/lib/programmers/MigrateApiFileProgrammer.js.map +1 -1
- package/lib/programmers/MigrateApiFunctionProgrammer.d.ts +3 -3
- package/lib/programmers/MigrateApiFunctionProgrammer.js.map +1 -1
- package/lib/programmers/MigrateApiNamespaceProgrammer.d.ts +2 -2
- package/lib/programmers/MigrateApiNamespaceProgrammer.js.map +1 -1
- package/lib/programmers/MigrateApiProgrammer.js +2 -2
- package/lib/programmers/MigrateApiProgrammer.js.map +1 -1
- package/lib/programmers/MigrateApiSimulatationProgrammer.d.ts +3 -3
- package/lib/programmers/MigrateApiSimulatationProgrammer.js.map +1 -1
- package/lib/programmers/MigrateApiStartProgrammer.js +8 -8
- package/lib/programmers/MigrateApiStartProgrammer.js.map +1 -1
- package/lib/programmers/MigrateDtoProgrammer.d.ts +2 -2
- package/lib/programmers/MigrateDtoProgrammer.js.map +1 -1
- package/lib/programmers/MigrateE2eFileProgrammer.d.ts +3 -3
- package/lib/programmers/MigrateE2eFileProgrammer.js.map +1 -1
- package/lib/programmers/MigrateE2eProgrammer.js +1 -1
- package/lib/programmers/MigrateE2eProgrammer.js.map +1 -1
- package/lib/programmers/MigrateNestControllerProgrammer.d.ts +2 -2
- package/lib/programmers/MigrateNestControllerProgrammer.js.map +1 -1
- package/lib/programmers/MigrateNestMethodProgrammer.d.ts +2 -2
- package/lib/programmers/MigrateNestMethodProgrammer.js.map +1 -1
- package/lib/programmers/MigrateNestProgrammer.js +2 -2
- package/lib/programmers/MigrateNestProgrammer.js.map +1 -1
- package/lib/programmers/MigrateSchemaProgrammer.d.ts +2 -3
- package/lib/programmers/MigrateSchemaProgrammer.js +81 -44
- package/lib/programmers/MigrateSchemaProgrammer.js.map +1 -1
- package/lib/structures/IMigrateDto.d.ts +2 -2
- package/lib/structures/IMigrateProgram.d.ts +3 -4
- package/lib/structures/IMigrateRoute.d.ts +6 -6
- package/lib/utils/OpenApiTypeChecker.d.ts +15 -0
- package/lib/utils/OpenApiTypeChecker.js +28 -0
- package/lib/utils/OpenApiTypeChecker.js.map +1 -0
- package/package.json +79 -78
- package/src/MigrateApplication.ts +8 -13
- package/src/analyzers/MigrateControllerAnalyzer.ts +7 -5
- package/src/analyzers/MigrateMethodAnalyzer.ts +103 -179
- package/src/bundles/NEST_TEMPLATE.ts +1 -1
- package/src/factories/TypeLiteralFactory.ts +8 -1
- package/src/internal/MigrateCommander.ts +4 -4
- package/src/module.ts +0 -6
- package/src/programmers/MigrateApiFileProgrammer.ts +2 -2
- package/src/programmers/MigrateApiFunctionProgrammer.ts +3 -3
- package/src/programmers/MigrateApiNamespaceProgrammer.ts +5 -5
- package/src/programmers/MigrateApiProgrammer.ts +4 -2
- package/src/programmers/MigrateApiSimulatationProgrammer.ts +4 -4
- package/src/programmers/MigrateApiStartProgrammer.ts +8 -8
- package/src/programmers/MigrateDtoProgrammer.ts +5 -6
- package/src/programmers/MigrateE2eFileProgrammer.ts +4 -4
- package/src/programmers/MigrateE2eProgrammer.ts +3 -3
- package/src/programmers/MigrateImportProgrammer.ts +117 -117
- package/src/programmers/MigrateNestControllerProgrammer.ts +2 -2
- package/src/programmers/MigrateNestMethodProgrammer.ts +6 -7
- package/src/programmers/MigrateNestProgrammer.ts +2 -2
- package/src/programmers/MigrateSchemaProgrammer.ts +102 -54
- package/src/structures/IMigrateDto.ts +2 -2
- package/src/structures/IMigrateProgram.ts +4 -4
- package/src/structures/IMigrateRoute.ts +6 -6
- package/src/utils/OpenApiTypeChecker.ts +73 -0
- package/lib/structures/ISwagger.d.ts +0 -18
- package/lib/structures/ISwagger.js +0 -3
- package/lib/structures/ISwagger.js.map +0 -1
- package/lib/structures/ISwaggerComponents.d.ts +0 -12
- package/lib/structures/ISwaggerComponents.js +0 -3
- package/lib/structures/ISwaggerComponents.js.map +0 -1
- package/lib/structures/ISwaggerInfo.d.ts +0 -71
- package/lib/structures/ISwaggerInfo.js +0 -3
- package/lib/structures/ISwaggerInfo.js.map +0 -1
- package/lib/structures/ISwaggerRoute.d.ts +0 -15
- package/lib/structures/ISwaggerRoute.js +0 -3
- package/lib/structures/ISwaggerRoute.js.map +0 -1
- package/lib/structures/ISwaggerRouteBodyContent.d.ts +0 -14
- package/lib/structures/ISwaggerRouteBodyContent.js +0 -3
- package/lib/structures/ISwaggerRouteBodyContent.js.map +0 -1
- package/lib/structures/ISwaggerRouteHeader.d.ts +0 -0
- package/lib/structures/ISwaggerRouteHeader.js +0 -2
- package/lib/structures/ISwaggerRouteHeader.js.map +0 -1
- package/lib/structures/ISwaggerRouteParameter.d.ts +0 -13
- package/lib/structures/ISwaggerRouteParameter.js +0 -3
- package/lib/structures/ISwaggerRouteParameter.js.map +0 -1
- package/lib/structures/ISwaggerRouteRequestBody.d.ts +0 -11
- package/lib/structures/ISwaggerRouteRequestBody.js +0 -3
- package/lib/structures/ISwaggerRouteRequestBody.js.map +0 -1
- package/lib/structures/ISwaggerRouteResponse.d.ts +0 -10
- package/lib/structures/ISwaggerRouteResponse.js +0 -3
- package/lib/structures/ISwaggerRouteResponse.js.map +0 -1
- package/lib/structures/ISwaggerSchema.d.ts +0 -76
- package/lib/structures/ISwaggerSchema.js +0 -3
- package/lib/structures/ISwaggerSchema.js.map +0 -1
- package/lib/structures/ISwaggerSecurityScheme.d.ts +0 -40
- package/lib/structures/ISwaggerSecurityScheme.js +0 -3
- package/lib/structures/ISwaggerSecurityScheme.js.map +0 -1
- package/lib/structures/ISwaggerV20.d.ts +0 -8
- package/lib/structures/ISwaggerV20.js +0 -3
- package/lib/structures/ISwaggerV20.js.map +0 -1
- package/lib/structures/ISwaggerV31.d.ts +0 -9
- package/lib/structures/ISwaggerV31.js +0 -3
- package/lib/structures/ISwaggerV31.js.map +0 -1
- package/lib/utils/OpenApiConverter.d.ts +0 -5
- package/lib/utils/OpenApiConverter.js +0 -1572
- package/lib/utils/OpenApiConverter.js.map +0 -1
- package/lib/utils/SwaggerComponentsExplorer.d.ts +0 -9
- package/lib/utils/SwaggerComponentsExplorer.js +0 -29
- package/lib/utils/SwaggerComponentsExplorer.js.map +0 -1
- package/lib/utils/SwaggerTypeChecker.d.ts +0 -16
- package/lib/utils/SwaggerTypeChecker.js +0 -34
- package/lib/utils/SwaggerTypeChecker.js.map +0 -1
- package/src/structures/ISwagger.ts +0 -23
- package/src/structures/ISwaggerComponents.ts +0 -13
- package/src/structures/ISwaggerInfo.ts +0 -80
- package/src/structures/ISwaggerRoute.ts +0 -20
- package/src/structures/ISwaggerRouteBodyContent.ts +0 -15
- package/src/structures/ISwaggerRouteHeader.ts +0 -0
- package/src/structures/ISwaggerRouteParameter.ts +0 -14
- package/src/structures/ISwaggerRouteRequestBody.ts +0 -12
- package/src/structures/ISwaggerRouteResponse.ts +0 -11
- package/src/structures/ISwaggerSchema.ts +0 -91
- package/src/structures/ISwaggerSecurityScheme.ts +0 -47
- package/src/structures/ISwaggerV20.ts +0 -10
- package/src/structures/ISwaggerV31.ts +0 -10
- package/src/utils/OpenApiConverter.ts +0 -19
- package/src/utils/SwaggerComponentsExplorer.ts +0 -43
- package/src/utils/SwaggerTypeChecker.ts +0 -67
@@ -1,1572 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.OpenApiConverter = void 0;
|
7
|
-
// import V2_0Converter from "swagger2openapi";
|
8
|
-
const typia_1 = __importDefault(require("typia"));
|
9
|
-
const converter_1 = require("./openapi-down-convert/converter");
|
10
|
-
var OpenApiConverter;
|
11
|
-
(function (OpenApiConverter) {
|
12
|
-
// export const v2_0 = async (swagger: ISwaggerV20): Promise<ISwagger> => {
|
13
|
-
// const output = await V2_0Converter.convertObj(swagger, {});
|
14
|
-
// return typia.assert<ISwagger>(output.openapi);
|
15
|
-
// };
|
16
|
-
OpenApiConverter.v3_1 = (swagger) => {
|
17
|
-
const converter = new converter_1.Converter(swagger);
|
18
|
-
return ((input, errorFactory) => {
|
19
|
-
const __is = input => {
|
20
|
-
const $io0 = input => "string" === typeof input.openapi && RegExp(/^3\.0\.[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(input.openapi) && ("object" === typeof input.info && null !== input.info && $io1(input.info)) && (Array.isArray(input.servers) && input.servers.every(elem => "object" === typeof elem && null !== elem && $io4(elem))) && ("object" === typeof input.components && null !== input.components && false === Array.isArray(input.components) && $io5(input.components)) && ("object" === typeof input.paths && null !== input.paths && false === Array.isArray(input.paths) && $io38(input.paths)) && (undefined === input.security || Array.isArray(input.security) && input.security.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io44(elem)));
|
21
|
-
const $io1 = input => "string" === typeof input.title && (undefined === input.description || "string" === typeof input.description) && (undefined === input.termsOfService || "string" === typeof input.termsOfService && (/\/|:/.test(input.termsOfService) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.termsOfService))) && (undefined === input.contact || "object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) && $io2(input.contact)) && (undefined === input.license || "object" === typeof input.license && null !== input.license && $io3(input.license)) && "string" === typeof input.version;
|
22
|
-
const $io2 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.url || "string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url))) && (undefined === input.email || "string" === typeof input.email && /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(input.email));
|
23
|
-
const $io3 = input => "string" === typeof input.name && (undefined === input.url || "string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url)));
|
24
|
-
const $io4 = input => "string" === typeof input.url && (undefined === input.description || "string" === typeof input.description);
|
25
|
-
const $io5 = input => (undefined === input.parameters || "object" === typeof input.parameters && null !== input.parameters && false === Array.isArray(input.parameters) && $io6(input.parameters)) && (undefined === input.requestBodies || "object" === typeof input.requestBodies && null !== input.requestBodies && false === Array.isArray(input.requestBodies) && $io21(input.requestBodies)) && (undefined === input.responses || "object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) && $io25(input.responses)) && (undefined === input.schemas || "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && $io18(input.schemas)) && (undefined === input.securitySchemes || "object" === typeof input.securitySchemes && null !== input.securitySchemes && false === Array.isArray(input.securitySchemes) && $io27(input.securitySchemes));
|
26
|
-
const $io6 = input => Object.keys(input).every(key => {
|
27
|
-
const value = input[key];
|
28
|
-
if (undefined === value)
|
29
|
-
return true;
|
30
|
-
return "object" === typeof value && null !== value && $io7(value);
|
31
|
-
});
|
32
|
-
const $io7 = input => (undefined === input.name || "string" === typeof input.name) && ("cookie" === input["in"] || "header" === input["in"] || "path" === input["in"] || "query" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description);
|
33
|
-
const $io8 = input => null !== input.type && undefined === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
34
|
-
const $io9 = input => "null" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
35
|
-
const $io10 = input => Array.isArray(input.anyOf) && input.anyOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $iu0(elem)) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
36
|
-
const $io11 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $iu0(elem)) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
37
|
-
const $io12 = input => (undefined === input["default"] || "boolean" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "boolean" === typeof elem)) && "boolean" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
38
|
-
const $io13 = input => (undefined === input["default"] || "number" === typeof input["default"] && (Math.floor(input["default"]) === input["default"] && -2147483648 <= input["default"] && input["default"] <= 2147483647)) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "number" === typeof elem)) && (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -2147483648 <= input.minimum && input.minimum <= 2147483647)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -2147483648 <= input.maximum && input.maximum <= 2147483647)) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 4294967295)) && "integer" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
39
|
-
const $io14 = input => (undefined === input["default"] || "number" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "number" === typeof elem)) && (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf) && "number" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
40
|
-
const $io15 = input => (undefined === input["default"] || "string" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "string" === typeof elem)) && (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 4294967295)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 4294967295)) && "string" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
41
|
-
const $io16 = input => "object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) && $iu0(input.items) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 4294967295)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 4294967295)) && (undefined === input["x-typia-tuple"] || "object" === typeof input["x-typia-tuple"] && null !== input["x-typia-tuple"] && $io20(input["x-typia-tuple"])) && "array" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
42
|
-
const $io17 = input => (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io18(input.properties)) && (undefined === input.required || Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && (null !== input.additionalProperties && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) && $iu0(input.additionalProperties))) && (undefined === input["x-typia-patternProperties"] || "object" === typeof input["x-typia-patternProperties"] && null !== input["x-typia-patternProperties"] && false === Array.isArray(input["x-typia-patternProperties"]) && $io18(input["x-typia-patternProperties"])) && "object" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
43
|
-
const $io18 = input => Object.keys(input).every(key => {
|
44
|
-
const value = input[key];
|
45
|
-
if (undefined === value)
|
46
|
-
return true;
|
47
|
-
return "object" === typeof value && null !== value && false === Array.isArray(value) && $iu0(value);
|
48
|
-
});
|
49
|
-
const $io19 = input => "string" === typeof input.$ref && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
50
|
-
const $io20 = input => Array.isArray(input.items) && input.items.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $iu0(elem)) && "array" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
51
|
-
const $io21 = input => Object.keys(input).every(key => {
|
52
|
-
const value = input[key];
|
53
|
-
if (undefined === value)
|
54
|
-
return true;
|
55
|
-
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io22(value);
|
56
|
-
});
|
57
|
-
const $io22 = input => (undefined === input.description || "string" === typeof input.description) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.content || "object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && $io23(input.content));
|
58
|
-
const $io23 = input => (undefined === input["text/plain"] || "object" === typeof input["text/plain"] && null !== input["text/plain"] && false === Array.isArray(input["text/plain"]) && $io24(input["text/plain"])) && (undefined === input["application/json"] || "object" === typeof input["application/json"] && null !== input["application/json"] && false === Array.isArray(input["application/json"]) && $io24(input["application/json"])) && (undefined === input["application/x-www-form-urlencoded"] || "object" === typeof input["application/x-www-form-urlencoded"] && null !== input["application/x-www-form-urlencoded"] && false === Array.isArray(input["application/x-www-form-urlencoded"]) && $io24(input["application/x-www-form-urlencoded"])) && (undefined === input["multipart/form-data"] || "object" === typeof input["multipart/form-data"] && null !== input["multipart/form-data"] && false === Array.isArray(input["multipart/form-data"]) && $io24(input["multipart/form-data"])) && (undefined === input["*/*"] || "object" === typeof input["*/*"] && null !== input["*/*"] && false === Array.isArray(input["*/*"]) && $io24(input["*/*"]));
|
59
|
-
const $io24 = input => (undefined === input.schema || "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema)) && (undefined === input["x-nestia-encrypted"] || "boolean" === typeof input["x-nestia-encrypted"]);
|
60
|
-
const $io25 = input => Object.keys(input).every(key => {
|
61
|
-
const value = input[key];
|
62
|
-
if (undefined === value)
|
63
|
-
return true;
|
64
|
-
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io26(value);
|
65
|
-
});
|
66
|
-
const $io26 = input => (undefined === input.description || "string" === typeof input.description) && (undefined === input.content || "object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && $io23(input.content));
|
67
|
-
const $io27 = input => Object.keys(input).every(key => {
|
68
|
-
const value = input[key];
|
69
|
-
if (undefined === value)
|
70
|
-
return true;
|
71
|
-
return "object" === typeof value && null !== value && $iu2(value);
|
72
|
-
});
|
73
|
-
const $io28 = input => "http" === input.type && "basic" === input.scheme;
|
74
|
-
const $io29 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat);
|
75
|
-
const $io30 = input => "apiKey" === input.type && (undefined === input["in"] || "cookie" === input["in"] || "header" === input["in"] || "query" === input["in"]) && (undefined === input.name || "string" === typeof input.name);
|
76
|
-
const $io31 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl;
|
77
|
-
const $io32 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && $io33(input.flows)) && (undefined === input.description || "string" === typeof input.description);
|
78
|
-
const $io33 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && $io34(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && $io36(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) && $io37(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) && $io37(input.clientCredentials));
|
79
|
-
const $io34 = input => "string" === typeof input.authorizationUrl && (undefined === input.tokenUrl || "string" === typeof input.tokenUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io35(input.scopes));
|
80
|
-
const $io35 = input => Object.keys(input).every(key => {
|
81
|
-
const value = input[key];
|
82
|
-
if (undefined === value)
|
83
|
-
return true;
|
84
|
-
return "string" === typeof value;
|
85
|
-
});
|
86
|
-
const $io36 = input => "string" === typeof input.authorizationUrl && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io35(input.scopes));
|
87
|
-
const $io37 = input => (undefined === input.tokenUrl || "string" === typeof input.tokenUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io35(input.scopes));
|
88
|
-
const $io38 = input => Object.keys(input).every(key => {
|
89
|
-
const value = input[key];
|
90
|
-
if (undefined === value)
|
91
|
-
return true;
|
92
|
-
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io39(value);
|
93
|
-
});
|
94
|
-
const $io39 = input => (undefined === input.get || "object" === typeof input.get && null !== input.get && false === Array.isArray(input.get) && $io40(input.get)) && (undefined === input.post || "object" === typeof input.post && null !== input.post && false === Array.isArray(input.post) && $io40(input.post)) && (undefined === input.patch || "object" === typeof input.patch && null !== input.patch && false === Array.isArray(input.patch) && $io40(input.patch)) && (undefined === input.put || "object" === typeof input.put && null !== input.put && false === Array.isArray(input.put) && $io40(input.put)) && (undefined === input["delete"] || "object" === typeof input["delete"] && null !== input["delete"] && false === Array.isArray(input["delete"]) && $io40(input["delete"]));
|
95
|
-
const $io40 = input => (undefined === input.parameters || Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && $iu1(elem))) && (undefined === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && false === Array.isArray(input.requestBody) && $io22(input.requestBody)) && (undefined === input.responses || "object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) && $io42(input.responses)) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input.security || Array.isArray(input.security) && input.security.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io44(elem))) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input["x-nestia-jsDocTags"] || Array.isArray(input["x-nestia-jsDocTags"]) && input["x-nestia-jsDocTags"].every(elem => "object" === typeof elem && null !== elem && $io45(elem)));
|
96
|
-
const $io41 = input => "string" === typeof input.$ref && RegExp(/^#\/components\/parameters\/(.*)/).test(input.$ref);
|
97
|
-
const $io42 = input => Object.keys(input).every(key => {
|
98
|
-
const value = input[key];
|
99
|
-
if (undefined === value)
|
100
|
-
return true;
|
101
|
-
return "object" === typeof value && null !== value && false === Array.isArray(value) && $iu3(value);
|
102
|
-
});
|
103
|
-
const $io43 = input => "string" === typeof input.$ref && RegExp(/^#\/components\/responses\/(.*)/).test(input.$ref);
|
104
|
-
const $io44 = input => Object.keys(input).every(key => {
|
105
|
-
const value = input[key];
|
106
|
-
if (undefined === value)
|
107
|
-
return true;
|
108
|
-
return Array.isArray(value) && value.every(elem => "string" === typeof elem);
|
109
|
-
});
|
110
|
-
const $io45 = input => "string" === typeof input.name && (undefined === input.text || Array.isArray(input.text) && input.text.every(elem => "object" === typeof elem && null !== elem && $io46(elem)));
|
111
|
-
const $io46 = input => "string" === typeof input.text && "string" === typeof input.kind;
|
112
|
-
const $iu0 = input => (() => {
|
113
|
-
if ("null" === input.type)
|
114
|
-
return $io9(input);
|
115
|
-
else if (undefined !== input.anyOf)
|
116
|
-
return $io10(input);
|
117
|
-
else if (undefined !== input.oneOf)
|
118
|
-
return $io11(input);
|
119
|
-
else if ("boolean" === input.type)
|
120
|
-
return $io12(input);
|
121
|
-
else if ("number" === input.type)
|
122
|
-
return $io14(input);
|
123
|
-
else if ("integer" === input.type)
|
124
|
-
return $io13(input);
|
125
|
-
else if ("string" === input.type)
|
126
|
-
return $io15(input);
|
127
|
-
else if ("array" === input.type)
|
128
|
-
return $io16(input);
|
129
|
-
else if ("object" === input.type)
|
130
|
-
return $io17(input);
|
131
|
-
else if (undefined !== input.$ref)
|
132
|
-
return $io19(input);
|
133
|
-
else
|
134
|
-
return $io8(input);
|
135
|
-
})();
|
136
|
-
const $iu1 = input => (() => {
|
137
|
-
if (undefined !== input["in"])
|
138
|
-
return $io7(input);
|
139
|
-
else if (undefined !== input.$ref)
|
140
|
-
return $io41(input);
|
141
|
-
else
|
142
|
-
return false;
|
143
|
-
})();
|
144
|
-
const $iu2 = input => (() => {
|
145
|
-
if ("basic" === input.scheme)
|
146
|
-
return $io28(input);
|
147
|
-
else if ("bearer" === input.scheme)
|
148
|
-
return $io29(input);
|
149
|
-
else if ("apiKey" === input.type)
|
150
|
-
return $io30(input);
|
151
|
-
else if ("openIdConnect" === input.type)
|
152
|
-
return $io31(input);
|
153
|
-
else if ("oauth2" === input.type)
|
154
|
-
return $io32(input);
|
155
|
-
else
|
156
|
-
return false;
|
157
|
-
})();
|
158
|
-
const $iu3 = input => (() => {
|
159
|
-
if (undefined !== input.$ref)
|
160
|
-
return $io43(input);
|
161
|
-
else
|
162
|
-
return $io26(input);
|
163
|
-
})();
|
164
|
-
return "object" === typeof input && null !== input && $io0(input);
|
165
|
-
};
|
166
|
-
if (false === __is(input))
|
167
|
-
((input, _path, _exceptionable = true) => {
|
168
|
-
const $guard = typia_1.default.assert.guard;
|
169
|
-
const $join = typia_1.default.assert.join;
|
170
|
-
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.openapi && RegExp(/^3\.0\.[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(input.openapi) || $guard(_exceptionable, {
|
171
|
-
path: _path + ".openapi",
|
172
|
-
expected: "`3.0.${number}`",
|
173
|
-
value: input.openapi
|
174
|
-
}, errorFactory)) && (("object" === typeof input.info && null !== input.info || $guard(_exceptionable, {
|
175
|
-
path: _path + ".info",
|
176
|
-
expected: "ISwaggerInfo",
|
177
|
-
value: input.info
|
178
|
-
}, errorFactory)) && $ao1(input.info, _path + ".info", true && _exceptionable) || $guard(_exceptionable, {
|
179
|
-
path: _path + ".info",
|
180
|
-
expected: "ISwaggerInfo",
|
181
|
-
value: input.info
|
182
|
-
}, errorFactory)) && ((Array.isArray(input.servers) || $guard(_exceptionable, {
|
183
|
-
path: _path + ".servers",
|
184
|
-
expected: "Array<ISwagger.IServer>",
|
185
|
-
value: input.servers
|
186
|
-
}, errorFactory)) && input.servers.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
187
|
-
path: _path + ".servers[" + _index1 + "]",
|
188
|
-
expected: "ISwagger.IServer",
|
189
|
-
value: elem
|
190
|
-
}, errorFactory)) && $ao4(elem, _path + ".servers[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
191
|
-
path: _path + ".servers[" + _index1 + "]",
|
192
|
-
expected: "ISwagger.IServer",
|
193
|
-
value: elem
|
194
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
195
|
-
path: _path + ".servers",
|
196
|
-
expected: "Array<ISwagger.IServer>",
|
197
|
-
value: input.servers
|
198
|
-
}, errorFactory)) && (("object" === typeof input.components && null !== input.components && false === Array.isArray(input.components) || $guard(_exceptionable, {
|
199
|
-
path: _path + ".components",
|
200
|
-
expected: "ISwaggerComponents",
|
201
|
-
value: input.components
|
202
|
-
}, errorFactory)) && $ao5(input.components, _path + ".components", true && _exceptionable) || $guard(_exceptionable, {
|
203
|
-
path: _path + ".components",
|
204
|
-
expected: "ISwaggerComponents",
|
205
|
-
value: input.components
|
206
|
-
}, errorFactory)) && (("object" === typeof input.paths && null !== input.paths && false === Array.isArray(input.paths) || $guard(_exceptionable, {
|
207
|
-
path: _path + ".paths",
|
208
|
-
expected: "Record<string, ISwagger.IPath>",
|
209
|
-
value: input.paths
|
210
|
-
}, errorFactory)) && $ao38(input.paths, _path + ".paths", true && _exceptionable) || $guard(_exceptionable, {
|
211
|
-
path: _path + ".paths",
|
212
|
-
expected: "Record<string, ISwagger.IPath>",
|
213
|
-
value: input.paths
|
214
|
-
}, errorFactory)) && (undefined === input.security || (Array.isArray(input.security) || $guard(_exceptionable, {
|
215
|
-
path: _path + ".security",
|
216
|
-
expected: "(Array<Record<string, Array<string>>> | undefined)",
|
217
|
-
value: input.security
|
218
|
-
}, errorFactory)) && input.security.every((elem, _index2) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
219
|
-
path: _path + ".security[" + _index2 + "]",
|
220
|
-
expected: "Record<string, Array<string>>",
|
221
|
-
value: elem
|
222
|
-
}, errorFactory)) && $ao44(elem, _path + ".security[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
223
|
-
path: _path + ".security[" + _index2 + "]",
|
224
|
-
expected: "Record<string, Array<string>>",
|
225
|
-
value: elem
|
226
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
227
|
-
path: _path + ".security",
|
228
|
-
expected: "(Array<Record<string, Array<string>>> | undefined)",
|
229
|
-
value: input.security
|
230
|
-
}, errorFactory));
|
231
|
-
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.title || $guard(_exceptionable, {
|
232
|
-
path: _path + ".title",
|
233
|
-
expected: "string",
|
234
|
-
value: input.title
|
235
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
236
|
-
path: _path + ".description",
|
237
|
-
expected: "(string | undefined)",
|
238
|
-
value: input.description
|
239
|
-
}, errorFactory)) && (undefined === input.termsOfService || "string" === typeof input.termsOfService && (/\/|:/.test(input.termsOfService) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.termsOfService) || $guard(_exceptionable, {
|
240
|
-
path: _path + ".termsOfService",
|
241
|
-
expected: "string & Format<\"uri\">",
|
242
|
-
value: input.termsOfService
|
243
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
244
|
-
path: _path + ".termsOfService",
|
245
|
-
expected: "((string & Format<\"uri\">) | undefined)",
|
246
|
-
value: input.termsOfService
|
247
|
-
}, errorFactory)) && (undefined === input.contact || ("object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) || $guard(_exceptionable, {
|
248
|
-
path: _path + ".contact",
|
249
|
-
expected: "(ISwaggerInfo.IContact | undefined)",
|
250
|
-
value: input.contact
|
251
|
-
}, errorFactory)) && $ao2(input.contact, _path + ".contact", true && _exceptionable) || $guard(_exceptionable, {
|
252
|
-
path: _path + ".contact",
|
253
|
-
expected: "(ISwaggerInfo.IContact | undefined)",
|
254
|
-
value: input.contact
|
255
|
-
}, errorFactory)) && (undefined === input.license || ("object" === typeof input.license && null !== input.license || $guard(_exceptionable, {
|
256
|
-
path: _path + ".license",
|
257
|
-
expected: "(ISwaggerInfo.ILicense | undefined)",
|
258
|
-
value: input.license
|
259
|
-
}, errorFactory)) && $ao3(input.license, _path + ".license", true && _exceptionable) || $guard(_exceptionable, {
|
260
|
-
path: _path + ".license",
|
261
|
-
expected: "(ISwaggerInfo.ILicense | undefined)",
|
262
|
-
value: input.license
|
263
|
-
}, errorFactory)) && ("string" === typeof input.version || $guard(_exceptionable, {
|
264
|
-
path: _path + ".version",
|
265
|
-
expected: "string",
|
266
|
-
value: input.version
|
267
|
-
}, errorFactory));
|
268
|
-
const $ao2 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
269
|
-
path: _path + ".name",
|
270
|
-
expected: "(string | undefined)",
|
271
|
-
value: input.name
|
272
|
-
}, errorFactory)) && (undefined === input.url || "string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url) || $guard(_exceptionable, {
|
273
|
-
path: _path + ".url",
|
274
|
-
expected: "string & Format<\"uri\">",
|
275
|
-
value: input.url
|
276
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
277
|
-
path: _path + ".url",
|
278
|
-
expected: "((string & Format<\"uri\">) | undefined)",
|
279
|
-
value: input.url
|
280
|
-
}, errorFactory)) && (undefined === input.email || "string" === typeof input.email && (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(input.email) || $guard(_exceptionable, {
|
281
|
-
path: _path + ".email",
|
282
|
-
expected: "string & Format<\"email\">",
|
283
|
-
value: input.email
|
284
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
285
|
-
path: _path + ".email",
|
286
|
-
expected: "((string & Format<\"email\">) | undefined)",
|
287
|
-
value: input.email
|
288
|
-
}, errorFactory));
|
289
|
-
const $ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
|
290
|
-
path: _path + ".name",
|
291
|
-
expected: "string",
|
292
|
-
value: input.name
|
293
|
-
}, errorFactory)) && (undefined === input.url || "string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url) || $guard(_exceptionable, {
|
294
|
-
path: _path + ".url",
|
295
|
-
expected: "string & Format<\"uri\">",
|
296
|
-
value: input.url
|
297
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
298
|
-
path: _path + ".url",
|
299
|
-
expected: "((string & Format<\"uri\">) | undefined)",
|
300
|
-
value: input.url
|
301
|
-
}, errorFactory));
|
302
|
-
const $ao4 = (input, _path, _exceptionable = true) => ("string" === typeof input.url || $guard(_exceptionable, {
|
303
|
-
path: _path + ".url",
|
304
|
-
expected: "string",
|
305
|
-
value: input.url
|
306
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
307
|
-
path: _path + ".description",
|
308
|
-
expected: "(string | undefined)",
|
309
|
-
value: input.description
|
310
|
-
}, errorFactory));
|
311
|
-
const $ao5 = (input, _path, _exceptionable = true) => (undefined === input.parameters || ("object" === typeof input.parameters && null !== input.parameters && false === Array.isArray(input.parameters) || $guard(_exceptionable, {
|
312
|
-
path: _path + ".parameters",
|
313
|
-
expected: "(Record<string, ISwaggerRouteParameter> | undefined)",
|
314
|
-
value: input.parameters
|
315
|
-
}, errorFactory)) && $ao6(input.parameters, _path + ".parameters", true && _exceptionable) || $guard(_exceptionable, {
|
316
|
-
path: _path + ".parameters",
|
317
|
-
expected: "(Record<string, ISwaggerRouteParameter> | undefined)",
|
318
|
-
value: input.parameters
|
319
|
-
}, errorFactory)) && (undefined === input.requestBodies || ("object" === typeof input.requestBodies && null !== input.requestBodies && false === Array.isArray(input.requestBodies) || $guard(_exceptionable, {
|
320
|
-
path: _path + ".requestBodies",
|
321
|
-
expected: "(Record<string, ISwaggerRouteRequestBody> | undefined)",
|
322
|
-
value: input.requestBodies
|
323
|
-
}, errorFactory)) && $ao21(input.requestBodies, _path + ".requestBodies", true && _exceptionable) || $guard(_exceptionable, {
|
324
|
-
path: _path + ".requestBodies",
|
325
|
-
expected: "(Record<string, ISwaggerRouteRequestBody> | undefined)",
|
326
|
-
value: input.requestBodies
|
327
|
-
}, errorFactory)) && (undefined === input.responses || ("object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) || $guard(_exceptionable, {
|
328
|
-
path: _path + ".responses",
|
329
|
-
expected: "(Record<string, ISwaggerRouteResponse> | undefined)",
|
330
|
-
value: input.responses
|
331
|
-
}, errorFactory)) && $ao25(input.responses, _path + ".responses", true && _exceptionable) || $guard(_exceptionable, {
|
332
|
-
path: _path + ".responses",
|
333
|
-
expected: "(Record<string, ISwaggerRouteResponse> | undefined)",
|
334
|
-
value: input.responses
|
335
|
-
}, errorFactory)) && (undefined === input.schemas || ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || $guard(_exceptionable, {
|
336
|
-
path: _path + ".schemas",
|
337
|
-
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
338
|
-
value: input.schemas
|
339
|
-
}, errorFactory)) && $ao18(input.schemas, _path + ".schemas", true && _exceptionable) || $guard(_exceptionable, {
|
340
|
-
path: _path + ".schemas",
|
341
|
-
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
342
|
-
value: input.schemas
|
343
|
-
}, errorFactory)) && (undefined === input.securitySchemes || ("object" === typeof input.securitySchemes && null !== input.securitySchemes && false === Array.isArray(input.securitySchemes) || $guard(_exceptionable, {
|
344
|
-
path: _path + ".securitySchemes",
|
345
|
-
expected: "(Record<string, ISwaggerSecurityScheme> | undefined)",
|
346
|
-
value: input.securitySchemes
|
347
|
-
}, errorFactory)) && $ao27(input.securitySchemes, _path + ".securitySchemes", true && _exceptionable) || $guard(_exceptionable, {
|
348
|
-
path: _path + ".securitySchemes",
|
349
|
-
expected: "(Record<string, ISwaggerSecurityScheme> | undefined)",
|
350
|
-
value: input.securitySchemes
|
351
|
-
}, errorFactory));
|
352
|
-
const $ao6 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
353
|
-
const value = input[key];
|
354
|
-
if (undefined === value)
|
355
|
-
return true;
|
356
|
-
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
357
|
-
path: _path + $join(key),
|
358
|
-
expected: "ISwaggerRouteParameter",
|
359
|
-
value: value
|
360
|
-
}, errorFactory)) && $ao7(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
361
|
-
path: _path + $join(key),
|
362
|
-
expected: "ISwaggerRouteParameter",
|
363
|
-
value: value
|
364
|
-
}, errorFactory);
|
365
|
-
});
|
366
|
-
const $ao7 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
367
|
-
path: _path + ".name",
|
368
|
-
expected: "(string | undefined)",
|
369
|
-
value: input.name
|
370
|
-
}, errorFactory)) && ("cookie" === input["in"] || "header" === input["in"] || "path" === input["in"] || "query" === input["in"] || $guard(_exceptionable, {
|
371
|
-
path: _path + "[\"in\"]",
|
372
|
-
expected: "(\"cookie\" | \"header\" | \"path\" | \"query\")",
|
373
|
-
value: input["in"]
|
374
|
-
}, errorFactory)) && (("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $guard(_exceptionable, {
|
375
|
-
path: _path + ".schema",
|
376
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
377
|
-
value: input.schema
|
378
|
-
}, errorFactory)) && $au0(input.schema, _path + ".schema", true && _exceptionable) || $guard(_exceptionable, {
|
379
|
-
path: _path + ".schema",
|
380
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
381
|
-
value: input.schema
|
382
|
-
}, errorFactory)) && (undefined === input.required || "boolean" === typeof input.required || $guard(_exceptionable, {
|
383
|
-
path: _path + ".required",
|
384
|
-
expected: "(boolean | undefined)",
|
385
|
-
value: input.required
|
386
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
387
|
-
path: _path + ".description",
|
388
|
-
expected: "(string | undefined)",
|
389
|
-
value: input.description
|
390
|
-
}, errorFactory));
|
391
|
-
const $ao8 = (input, _path, _exceptionable = true) => (null !== input.type || $guard(_exceptionable, {
|
392
|
-
path: _path + ".type",
|
393
|
-
expected: "undefined",
|
394
|
-
value: input.type
|
395
|
-
}, errorFactory)) && (undefined === input.type || $guard(_exceptionable, {
|
396
|
-
path: _path + ".type",
|
397
|
-
expected: "undefined",
|
398
|
-
value: input.type
|
399
|
-
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
400
|
-
path: _path + ".title",
|
401
|
-
expected: "(string | undefined)",
|
402
|
-
value: input.title
|
403
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
404
|
-
path: _path + ".description",
|
405
|
-
expected: "(string | undefined)",
|
406
|
-
value: input.description
|
407
|
-
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
408
|
-
path: _path + ".deprecated",
|
409
|
-
expected: "(boolean | undefined)",
|
410
|
-
value: input.deprecated
|
411
|
-
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
412
|
-
path: _path + "[\"x-typia-optional\"]",
|
413
|
-
expected: "(boolean | undefined)",
|
414
|
-
value: input["x-typia-optional"]
|
415
|
-
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
416
|
-
path: _path + "[\"x-typia-rest\"]",
|
417
|
-
expected: "(boolean | undefined)",
|
418
|
-
value: input["x-typia-rest"]
|
419
|
-
}, errorFactory));
|
420
|
-
const $ao9 = (input, _path, _exceptionable = true) => ("null" === input.type || $guard(_exceptionable, {
|
421
|
-
path: _path + ".type",
|
422
|
-
expected: "\"null\"",
|
423
|
-
value: input.type
|
424
|
-
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
425
|
-
path: _path + ".title",
|
426
|
-
expected: "(string | undefined)",
|
427
|
-
value: input.title
|
428
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
429
|
-
path: _path + ".description",
|
430
|
-
expected: "(string | undefined)",
|
431
|
-
value: input.description
|
432
|
-
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
433
|
-
path: _path + ".deprecated",
|
434
|
-
expected: "(boolean | undefined)",
|
435
|
-
value: input.deprecated
|
436
|
-
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
437
|
-
path: _path + "[\"x-typia-optional\"]",
|
438
|
-
expected: "(boolean | undefined)",
|
439
|
-
value: input["x-typia-optional"]
|
440
|
-
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
441
|
-
path: _path + "[\"x-typia-rest\"]",
|
442
|
-
expected: "(boolean | undefined)",
|
443
|
-
value: input["x-typia-rest"]
|
444
|
-
}, errorFactory));
|
445
|
-
const $ao10 = (input, _path, _exceptionable = true) => ((Array.isArray(input.anyOf) || $guard(_exceptionable, {
|
446
|
-
path: _path + ".anyOf",
|
447
|
-
expected: "Array<ISwaggerSchema>",
|
448
|
-
value: input.anyOf
|
449
|
-
}, errorFactory)) && input.anyOf.every((elem, _index3) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
450
|
-
path: _path + ".anyOf[" + _index3 + "]",
|
451
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
452
|
-
value: elem
|
453
|
-
}, errorFactory)) && $au0(elem, _path + ".anyOf[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
454
|
-
path: _path + ".anyOf[" + _index3 + "]",
|
455
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
456
|
-
value: elem
|
457
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
458
|
-
path: _path + ".anyOf",
|
459
|
-
expected: "Array<ISwaggerSchema>",
|
460
|
-
value: input.anyOf
|
461
|
-
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
462
|
-
path: _path + ".title",
|
463
|
-
expected: "(string | undefined)",
|
464
|
-
value: input.title
|
465
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
466
|
-
path: _path + ".description",
|
467
|
-
expected: "(string | undefined)",
|
468
|
-
value: input.description
|
469
|
-
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
470
|
-
path: _path + ".deprecated",
|
471
|
-
expected: "(boolean | undefined)",
|
472
|
-
value: input.deprecated
|
473
|
-
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
474
|
-
path: _path + "[\"x-typia-optional\"]",
|
475
|
-
expected: "(boolean | undefined)",
|
476
|
-
value: input["x-typia-optional"]
|
477
|
-
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
478
|
-
path: _path + "[\"x-typia-rest\"]",
|
479
|
-
expected: "(boolean | undefined)",
|
480
|
-
value: input["x-typia-rest"]
|
481
|
-
}, errorFactory));
|
482
|
-
const $ao11 = (input, _path, _exceptionable = true) => ((Array.isArray(input.oneOf) || $guard(_exceptionable, {
|
483
|
-
path: _path + ".oneOf",
|
484
|
-
expected: "Array<ISwaggerSchema>",
|
485
|
-
value: input.oneOf
|
486
|
-
}, errorFactory)) && input.oneOf.every((elem, _index4) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
487
|
-
path: _path + ".oneOf[" + _index4 + "]",
|
488
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
489
|
-
value: elem
|
490
|
-
}, errorFactory)) && $au0(elem, _path + ".oneOf[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
491
|
-
path: _path + ".oneOf[" + _index4 + "]",
|
492
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
493
|
-
value: elem
|
494
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
495
|
-
path: _path + ".oneOf",
|
496
|
-
expected: "Array<ISwaggerSchema>",
|
497
|
-
value: input.oneOf
|
498
|
-
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
499
|
-
path: _path + ".title",
|
500
|
-
expected: "(string | undefined)",
|
501
|
-
value: input.title
|
502
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
503
|
-
path: _path + ".description",
|
504
|
-
expected: "(string | undefined)",
|
505
|
-
value: input.description
|
506
|
-
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
507
|
-
path: _path + ".deprecated",
|
508
|
-
expected: "(boolean | undefined)",
|
509
|
-
value: input.deprecated
|
510
|
-
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
511
|
-
path: _path + "[\"x-typia-optional\"]",
|
512
|
-
expected: "(boolean | undefined)",
|
513
|
-
value: input["x-typia-optional"]
|
514
|
-
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
515
|
-
path: _path + "[\"x-typia-rest\"]",
|
516
|
-
expected: "(boolean | undefined)",
|
517
|
-
value: input["x-typia-rest"]
|
518
|
-
}, errorFactory));
|
519
|
-
const $ao12 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "boolean" === typeof input["default"] || $guard(_exceptionable, {
|
520
|
-
path: _path + "[\"default\"]",
|
521
|
-
expected: "(boolean | undefined)",
|
522
|
-
value: input["default"]
|
523
|
-
}, errorFactory)) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
524
|
-
path: _path + "[\"enum\"]",
|
525
|
-
expected: "(Array<boolean> | undefined)",
|
526
|
-
value: input["enum"]
|
527
|
-
}, errorFactory)) && input["enum"].every((elem, _index5) => "boolean" === typeof elem || $guard(_exceptionable, {
|
528
|
-
path: _path + "[\"enum\"][" + _index5 + "]",
|
529
|
-
expected: "boolean",
|
530
|
-
value: elem
|
531
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
532
|
-
path: _path + "[\"enum\"]",
|
533
|
-
expected: "(Array<boolean> | undefined)",
|
534
|
-
value: input["enum"]
|
535
|
-
}, errorFactory)) && ("boolean" === input.type || $guard(_exceptionable, {
|
536
|
-
path: _path + ".type",
|
537
|
-
expected: "\"boolean\"",
|
538
|
-
value: input.type
|
539
|
-
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
540
|
-
path: _path + ".nullable",
|
541
|
-
expected: "(boolean | undefined)",
|
542
|
-
value: input.nullable
|
543
|
-
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
544
|
-
path: _path + ".title",
|
545
|
-
expected: "(string | undefined)",
|
546
|
-
value: input.title
|
547
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
548
|
-
path: _path + ".description",
|
549
|
-
expected: "(string | undefined)",
|
550
|
-
value: input.description
|
551
|
-
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
552
|
-
path: _path + ".deprecated",
|
553
|
-
expected: "(boolean | undefined)",
|
554
|
-
value: input.deprecated
|
555
|
-
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
556
|
-
path: _path + "[\"x-typia-optional\"]",
|
557
|
-
expected: "(boolean | undefined)",
|
558
|
-
value: input["x-typia-optional"]
|
559
|
-
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
560
|
-
path: _path + "[\"x-typia-rest\"]",
|
561
|
-
expected: "(boolean | undefined)",
|
562
|
-
value: input["x-typia-rest"]
|
563
|
-
}, errorFactory));
|
564
|
-
const $ao13 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "number" === typeof input["default"] && (Math.floor(input["default"]) === input["default"] && -2147483648 <= input["default"] && input["default"] <= 2147483647 || $guard(_exceptionable, {
|
565
|
-
path: _path + "[\"default\"]",
|
566
|
-
expected: "number & Type<\"int32\">",
|
567
|
-
value: input["default"]
|
568
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
569
|
-
path: _path + "[\"default\"]",
|
570
|
-
expected: "((number & Type<\"int32\">) | undefined)",
|
571
|
-
value: input["default"]
|
572
|
-
}, errorFactory)) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
573
|
-
path: _path + "[\"enum\"]",
|
574
|
-
expected: "(Array<number> | undefined)",
|
575
|
-
value: input["enum"]
|
576
|
-
}, errorFactory)) && input["enum"].every((elem, _index6) => "number" === typeof elem || $guard(_exceptionable, {
|
577
|
-
path: _path + "[\"enum\"][" + _index6 + "]",
|
578
|
-
expected: "number",
|
579
|
-
value: elem
|
580
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
581
|
-
path: _path + "[\"enum\"]",
|
582
|
-
expected: "(Array<number> | undefined)",
|
583
|
-
value: input["enum"]
|
584
|
-
}, errorFactory)) && (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -2147483648 <= input.minimum && input.minimum <= 2147483647 || $guard(_exceptionable, {
|
585
|
-
path: _path + ".minimum",
|
586
|
-
expected: "number & Type<\"int32\">",
|
587
|
-
value: input.minimum
|
588
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
589
|
-
path: _path + ".minimum",
|
590
|
-
expected: "((number & Type<\"int32\">) | undefined)",
|
591
|
-
value: input.minimum
|
592
|
-
}, errorFactory)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -2147483648 <= input.maximum && input.maximum <= 2147483647 || $guard(_exceptionable, {
|
593
|
-
path: _path + ".maximum",
|
594
|
-
expected: "number & Type<\"int32\">",
|
595
|
-
value: input.maximum
|
596
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
597
|
-
path: _path + ".maximum",
|
598
|
-
expected: "((number & Type<\"int32\">) | undefined)",
|
599
|
-
value: input.maximum
|
600
|
-
}, errorFactory)) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || $guard(_exceptionable, {
|
601
|
-
path: _path + ".exclusiveMinimum",
|
602
|
-
expected: "(boolean | undefined)",
|
603
|
-
value: input.exclusiveMinimum
|
604
|
-
}, errorFactory)) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || $guard(_exceptionable, {
|
605
|
-
path: _path + ".exclusiveMaximum",
|
606
|
-
expected: "(boolean | undefined)",
|
607
|
-
value: input.exclusiveMaximum
|
608
|
-
}, errorFactory)) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 4294967295 || $guard(_exceptionable, {
|
609
|
-
path: _path + ".multipleOf",
|
610
|
-
expected: "number & Type<\"uint32\">",
|
611
|
-
value: input.multipleOf
|
612
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
613
|
-
path: _path + ".multipleOf",
|
614
|
-
expected: "((number & Type<\"uint32\">) | undefined)",
|
615
|
-
value: input.multipleOf
|
616
|
-
}, errorFactory)) && ("integer" === input.type || $guard(_exceptionable, {
|
617
|
-
path: _path + ".type",
|
618
|
-
expected: "\"integer\"",
|
619
|
-
value: input.type
|
620
|
-
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
621
|
-
path: _path + ".nullable",
|
622
|
-
expected: "(boolean | undefined)",
|
623
|
-
value: input.nullable
|
624
|
-
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
625
|
-
path: _path + ".title",
|
626
|
-
expected: "(string | undefined)",
|
627
|
-
value: input.title
|
628
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
629
|
-
path: _path + ".description",
|
630
|
-
expected: "(string | undefined)",
|
631
|
-
value: input.description
|
632
|
-
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
633
|
-
path: _path + ".deprecated",
|
634
|
-
expected: "(boolean | undefined)",
|
635
|
-
value: input.deprecated
|
636
|
-
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
637
|
-
path: _path + "[\"x-typia-optional\"]",
|
638
|
-
expected: "(boolean | undefined)",
|
639
|
-
value: input["x-typia-optional"]
|
640
|
-
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
641
|
-
path: _path + "[\"x-typia-rest\"]",
|
642
|
-
expected: "(boolean | undefined)",
|
643
|
-
value: input["x-typia-rest"]
|
644
|
-
}, errorFactory));
|
645
|
-
const $ao14 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "number" === typeof input["default"] || $guard(_exceptionable, {
|
646
|
-
path: _path + "[\"default\"]",
|
647
|
-
expected: "(number | undefined)",
|
648
|
-
value: input["default"]
|
649
|
-
}, errorFactory)) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
650
|
-
path: _path + "[\"enum\"]",
|
651
|
-
expected: "(Array<number> | undefined)",
|
652
|
-
value: input["enum"]
|
653
|
-
}, errorFactory)) && input["enum"].every((elem, _index7) => "number" === typeof elem || $guard(_exceptionable, {
|
654
|
-
path: _path + "[\"enum\"][" + _index7 + "]",
|
655
|
-
expected: "number",
|
656
|
-
value: elem
|
657
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
658
|
-
path: _path + "[\"enum\"]",
|
659
|
-
expected: "(Array<number> | undefined)",
|
660
|
-
value: input["enum"]
|
661
|
-
}, errorFactory)) && (undefined === input.minimum || "number" === typeof input.minimum || $guard(_exceptionable, {
|
662
|
-
path: _path + ".minimum",
|
663
|
-
expected: "(number | undefined)",
|
664
|
-
value: input.minimum
|
665
|
-
}, errorFactory)) && (undefined === input.maximum || "number" === typeof input.maximum || $guard(_exceptionable, {
|
666
|
-
path: _path + ".maximum",
|
667
|
-
expected: "(number | undefined)",
|
668
|
-
value: input.maximum
|
669
|
-
}, errorFactory)) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || $guard(_exceptionable, {
|
670
|
-
path: _path + ".exclusiveMinimum",
|
671
|
-
expected: "(boolean | undefined)",
|
672
|
-
value: input.exclusiveMinimum
|
673
|
-
}, errorFactory)) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum || $guard(_exceptionable, {
|
674
|
-
path: _path + ".exclusiveMaximum",
|
675
|
-
expected: "(boolean | undefined)",
|
676
|
-
value: input.exclusiveMaximum
|
677
|
-
}, errorFactory)) && (undefined === input.multipleOf || "number" === typeof input.multipleOf || $guard(_exceptionable, {
|
678
|
-
path: _path + ".multipleOf",
|
679
|
-
expected: "(number | undefined)",
|
680
|
-
value: input.multipleOf
|
681
|
-
}, errorFactory)) && ("number" === input.type || $guard(_exceptionable, {
|
682
|
-
path: _path + ".type",
|
683
|
-
expected: "\"number\"",
|
684
|
-
value: input.type
|
685
|
-
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
686
|
-
path: _path + ".nullable",
|
687
|
-
expected: "(boolean | undefined)",
|
688
|
-
value: input.nullable
|
689
|
-
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
690
|
-
path: _path + ".title",
|
691
|
-
expected: "(string | undefined)",
|
692
|
-
value: input.title
|
693
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
694
|
-
path: _path + ".description",
|
695
|
-
expected: "(string | undefined)",
|
696
|
-
value: input.description
|
697
|
-
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
698
|
-
path: _path + ".deprecated",
|
699
|
-
expected: "(boolean | undefined)",
|
700
|
-
value: input.deprecated
|
701
|
-
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
702
|
-
path: _path + "[\"x-typia-optional\"]",
|
703
|
-
expected: "(boolean | undefined)",
|
704
|
-
value: input["x-typia-optional"]
|
705
|
-
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
706
|
-
path: _path + "[\"x-typia-rest\"]",
|
707
|
-
expected: "(boolean | undefined)",
|
708
|
-
value: input["x-typia-rest"]
|
709
|
-
}, errorFactory));
|
710
|
-
const $ao15 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "string" === typeof input["default"] || $guard(_exceptionable, {
|
711
|
-
path: _path + "[\"default\"]",
|
712
|
-
expected: "(string | undefined)",
|
713
|
-
value: input["default"]
|
714
|
-
}, errorFactory)) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
715
|
-
path: _path + "[\"enum\"]",
|
716
|
-
expected: "(Array<string> | undefined)",
|
717
|
-
value: input["enum"]
|
718
|
-
}, errorFactory)) && input["enum"].every((elem, _index8) => "string" === typeof elem || $guard(_exceptionable, {
|
719
|
-
path: _path + "[\"enum\"][" + _index8 + "]",
|
720
|
-
expected: "string",
|
721
|
-
value: elem
|
722
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
723
|
-
path: _path + "[\"enum\"]",
|
724
|
-
expected: "(Array<string> | undefined)",
|
725
|
-
value: input["enum"]
|
726
|
-
}, errorFactory)) && (undefined === input.format || "string" === typeof input.format || $guard(_exceptionable, {
|
727
|
-
path: _path + ".format",
|
728
|
-
expected: "(string | undefined)",
|
729
|
-
value: input.format
|
730
|
-
}, errorFactory)) && (undefined === input.pattern || "string" === typeof input.pattern || $guard(_exceptionable, {
|
731
|
-
path: _path + ".pattern",
|
732
|
-
expected: "(string | undefined)",
|
733
|
-
value: input.pattern
|
734
|
-
}, errorFactory)) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType || $guard(_exceptionable, {
|
735
|
-
path: _path + ".contentMediaType",
|
736
|
-
expected: "(string | undefined)",
|
737
|
-
value: input.contentMediaType
|
738
|
-
}, errorFactory)) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 4294967295 || $guard(_exceptionable, {
|
739
|
-
path: _path + ".minLength",
|
740
|
-
expected: "number & Type<\"uint32\">",
|
741
|
-
value: input.minLength
|
742
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
743
|
-
path: _path + ".minLength",
|
744
|
-
expected: "((number & Type<\"uint32\">) | undefined)",
|
745
|
-
value: input.minLength
|
746
|
-
}, errorFactory)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 4294967295 || $guard(_exceptionable, {
|
747
|
-
path: _path + ".maxLength",
|
748
|
-
expected: "number & Type<\"uint32\">",
|
749
|
-
value: input.maxLength
|
750
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
751
|
-
path: _path + ".maxLength",
|
752
|
-
expected: "((number & Type<\"uint32\">) | undefined)",
|
753
|
-
value: input.maxLength
|
754
|
-
}, errorFactory)) && ("string" === input.type || $guard(_exceptionable, {
|
755
|
-
path: _path + ".type",
|
756
|
-
expected: "\"string\"",
|
757
|
-
value: input.type
|
758
|
-
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
759
|
-
path: _path + ".nullable",
|
760
|
-
expected: "(boolean | undefined)",
|
761
|
-
value: input.nullable
|
762
|
-
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
763
|
-
path: _path + ".title",
|
764
|
-
expected: "(string | undefined)",
|
765
|
-
value: input.title
|
766
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
767
|
-
path: _path + ".description",
|
768
|
-
expected: "(string | undefined)",
|
769
|
-
value: input.description
|
770
|
-
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
771
|
-
path: _path + ".deprecated",
|
772
|
-
expected: "(boolean | undefined)",
|
773
|
-
value: input.deprecated
|
774
|
-
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
775
|
-
path: _path + "[\"x-typia-optional\"]",
|
776
|
-
expected: "(boolean | undefined)",
|
777
|
-
value: input["x-typia-optional"]
|
778
|
-
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
779
|
-
path: _path + "[\"x-typia-rest\"]",
|
780
|
-
expected: "(boolean | undefined)",
|
781
|
-
value: input["x-typia-rest"]
|
782
|
-
}, errorFactory));
|
783
|
-
const $ao16 = (input, _path, _exceptionable = true) => (("object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) || $guard(_exceptionable, {
|
784
|
-
path: _path + ".items",
|
785
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
786
|
-
value: input.items
|
787
|
-
}, errorFactory)) && $au0(input.items, _path + ".items", true && _exceptionable) || $guard(_exceptionable, {
|
788
|
-
path: _path + ".items",
|
789
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
790
|
-
value: input.items
|
791
|
-
}, errorFactory)) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 4294967295 || $guard(_exceptionable, {
|
792
|
-
path: _path + ".minItems",
|
793
|
-
expected: "number & Type<\"uint32\">",
|
794
|
-
value: input.minItems
|
795
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
796
|
-
path: _path + ".minItems",
|
797
|
-
expected: "((number & Type<\"uint32\">) | undefined)",
|
798
|
-
value: input.minItems
|
799
|
-
}, errorFactory)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 4294967295 || $guard(_exceptionable, {
|
800
|
-
path: _path + ".maxItems",
|
801
|
-
expected: "number & Type<\"uint32\">",
|
802
|
-
value: input.maxItems
|
803
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
804
|
-
path: _path + ".maxItems",
|
805
|
-
expected: "((number & Type<\"uint32\">) | undefined)",
|
806
|
-
value: input.maxItems
|
807
|
-
}, errorFactory)) && (undefined === input["x-typia-tuple"] || ("object" === typeof input["x-typia-tuple"] && null !== input["x-typia-tuple"] || $guard(_exceptionable, {
|
808
|
-
path: _path + "[\"x-typia-tuple\"]",
|
809
|
-
expected: "(ISwaggerSchema.ITuple | undefined)",
|
810
|
-
value: input["x-typia-tuple"]
|
811
|
-
}, errorFactory)) && $ao20(input["x-typia-tuple"], _path + "[\"x-typia-tuple\"]", true && _exceptionable) || $guard(_exceptionable, {
|
812
|
-
path: _path + "[\"x-typia-tuple\"]",
|
813
|
-
expected: "(ISwaggerSchema.ITuple | undefined)",
|
814
|
-
value: input["x-typia-tuple"]
|
815
|
-
}, errorFactory)) && ("array" === input.type || $guard(_exceptionable, {
|
816
|
-
path: _path + ".type",
|
817
|
-
expected: "\"array\"",
|
818
|
-
value: input.type
|
819
|
-
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
820
|
-
path: _path + ".nullable",
|
821
|
-
expected: "(boolean | undefined)",
|
822
|
-
value: input.nullable
|
823
|
-
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
824
|
-
path: _path + ".title",
|
825
|
-
expected: "(string | undefined)",
|
826
|
-
value: input.title
|
827
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
828
|
-
path: _path + ".description",
|
829
|
-
expected: "(string | undefined)",
|
830
|
-
value: input.description
|
831
|
-
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
832
|
-
path: _path + ".deprecated",
|
833
|
-
expected: "(boolean | undefined)",
|
834
|
-
value: input.deprecated
|
835
|
-
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
836
|
-
path: _path + "[\"x-typia-optional\"]",
|
837
|
-
expected: "(boolean | undefined)",
|
838
|
-
value: input["x-typia-optional"]
|
839
|
-
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
840
|
-
path: _path + "[\"x-typia-rest\"]",
|
841
|
-
expected: "(boolean | undefined)",
|
842
|
-
value: input["x-typia-rest"]
|
843
|
-
}, errorFactory));
|
844
|
-
const $ao17 = (input, _path, _exceptionable = true) => (undefined === input.properties || ("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) || $guard(_exceptionable, {
|
845
|
-
path: _path + ".properties",
|
846
|
-
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
847
|
-
value: input.properties
|
848
|
-
}, errorFactory)) && $ao18(input.properties, _path + ".properties", true && _exceptionable) || $guard(_exceptionable, {
|
849
|
-
path: _path + ".properties",
|
850
|
-
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
851
|
-
value: input.properties
|
852
|
-
}, errorFactory)) && (undefined === input.required || (Array.isArray(input.required) || $guard(_exceptionable, {
|
853
|
-
path: _path + ".required",
|
854
|
-
expected: "(Array<string> | undefined)",
|
855
|
-
value: input.required
|
856
|
-
}, errorFactory)) && input.required.every((elem, _index9) => "string" === typeof elem || $guard(_exceptionable, {
|
857
|
-
path: _path + ".required[" + _index9 + "]",
|
858
|
-
expected: "string",
|
859
|
-
value: elem
|
860
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
861
|
-
path: _path + ".required",
|
862
|
-
expected: "(Array<string> | undefined)",
|
863
|
-
value: input.required
|
864
|
-
}, errorFactory)) && ((null !== input.additionalProperties || $guard(_exceptionable, {
|
865
|
-
path: _path + ".additionalProperties",
|
866
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | boolean | undefined)",
|
867
|
-
value: input.additionalProperties
|
868
|
-
}, errorFactory)) && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || ("object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) || $guard(_exceptionable, {
|
869
|
-
path: _path + ".additionalProperties",
|
870
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | boolean | undefined)",
|
871
|
-
value: input.additionalProperties
|
872
|
-
}, errorFactory)) && $au0(input.additionalProperties, _path + ".additionalProperties", true && _exceptionable) || $guard(_exceptionable, {
|
873
|
-
path: _path + ".additionalProperties",
|
874
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | boolean | undefined)",
|
875
|
-
value: input.additionalProperties
|
876
|
-
}, errorFactory))) && (undefined === input["x-typia-patternProperties"] || ("object" === typeof input["x-typia-patternProperties"] && null !== input["x-typia-patternProperties"] && false === Array.isArray(input["x-typia-patternProperties"]) || $guard(_exceptionable, {
|
877
|
-
path: _path + "[\"x-typia-patternProperties\"]",
|
878
|
-
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
879
|
-
value: input["x-typia-patternProperties"]
|
880
|
-
}, errorFactory)) && $ao18(input["x-typia-patternProperties"], _path + "[\"x-typia-patternProperties\"]", true && _exceptionable) || $guard(_exceptionable, {
|
881
|
-
path: _path + "[\"x-typia-patternProperties\"]",
|
882
|
-
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
883
|
-
value: input["x-typia-patternProperties"]
|
884
|
-
}, errorFactory)) && ("object" === input.type || $guard(_exceptionable, {
|
885
|
-
path: _path + ".type",
|
886
|
-
expected: "\"object\"",
|
887
|
-
value: input.type
|
888
|
-
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
889
|
-
path: _path + ".nullable",
|
890
|
-
expected: "(boolean | undefined)",
|
891
|
-
value: input.nullable
|
892
|
-
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
893
|
-
path: _path + ".title",
|
894
|
-
expected: "(string | undefined)",
|
895
|
-
value: input.title
|
896
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
897
|
-
path: _path + ".description",
|
898
|
-
expected: "(string | undefined)",
|
899
|
-
value: input.description
|
900
|
-
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
901
|
-
path: _path + ".deprecated",
|
902
|
-
expected: "(boolean | undefined)",
|
903
|
-
value: input.deprecated
|
904
|
-
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
905
|
-
path: _path + "[\"x-typia-optional\"]",
|
906
|
-
expected: "(boolean | undefined)",
|
907
|
-
value: input["x-typia-optional"]
|
908
|
-
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
909
|
-
path: _path + "[\"x-typia-rest\"]",
|
910
|
-
expected: "(boolean | undefined)",
|
911
|
-
value: input["x-typia-rest"]
|
912
|
-
}, errorFactory));
|
913
|
-
const $ao18 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
914
|
-
const value = input[key];
|
915
|
-
if (undefined === value)
|
916
|
-
return true;
|
917
|
-
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
918
|
-
path: _path + $join(key),
|
919
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
920
|
-
value: value
|
921
|
-
}, errorFactory)) && $au0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
922
|
-
path: _path + $join(key),
|
923
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
924
|
-
value: value
|
925
|
-
}, errorFactory);
|
926
|
-
});
|
927
|
-
const $ao19 = (input, _path, _exceptionable = true) => ("string" === typeof input.$ref || $guard(_exceptionable, {
|
928
|
-
path: _path + ".$ref",
|
929
|
-
expected: "string",
|
930
|
-
value: input.$ref
|
931
|
-
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
932
|
-
path: _path + ".title",
|
933
|
-
expected: "(string | undefined)",
|
934
|
-
value: input.title
|
935
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
936
|
-
path: _path + ".description",
|
937
|
-
expected: "(string | undefined)",
|
938
|
-
value: input.description
|
939
|
-
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
940
|
-
path: _path + ".deprecated",
|
941
|
-
expected: "(boolean | undefined)",
|
942
|
-
value: input.deprecated
|
943
|
-
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
944
|
-
path: _path + "[\"x-typia-optional\"]",
|
945
|
-
expected: "(boolean | undefined)",
|
946
|
-
value: input["x-typia-optional"]
|
947
|
-
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
948
|
-
path: _path + "[\"x-typia-rest\"]",
|
949
|
-
expected: "(boolean | undefined)",
|
950
|
-
value: input["x-typia-rest"]
|
951
|
-
}, errorFactory));
|
952
|
-
const $ao20 = (input, _path, _exceptionable = true) => ((Array.isArray(input.items) || $guard(_exceptionable, {
|
953
|
-
path: _path + ".items",
|
954
|
-
expected: "Array<ISwaggerSchema>",
|
955
|
-
value: input.items
|
956
|
-
}, errorFactory)) && input.items.every((elem, _index10) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
957
|
-
path: _path + ".items[" + _index10 + "]",
|
958
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
959
|
-
value: elem
|
960
|
-
}, errorFactory)) && $au0(elem, _path + ".items[" + _index10 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
961
|
-
path: _path + ".items[" + _index10 + "]",
|
962
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
963
|
-
value: elem
|
964
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
965
|
-
path: _path + ".items",
|
966
|
-
expected: "Array<ISwaggerSchema>",
|
967
|
-
value: input.items
|
968
|
-
}, errorFactory)) && ("array" === input.type || $guard(_exceptionable, {
|
969
|
-
path: _path + ".type",
|
970
|
-
expected: "\"array\"",
|
971
|
-
value: input.type
|
972
|
-
}, errorFactory)) && (undefined === input.nullable || "boolean" === typeof input.nullable || $guard(_exceptionable, {
|
973
|
-
path: _path + ".nullable",
|
974
|
-
expected: "(boolean | undefined)",
|
975
|
-
value: input.nullable
|
976
|
-
}, errorFactory)) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
977
|
-
path: _path + ".title",
|
978
|
-
expected: "(string | undefined)",
|
979
|
-
value: input.title
|
980
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
981
|
-
path: _path + ".description",
|
982
|
-
expected: "(string | undefined)",
|
983
|
-
value: input.description
|
984
|
-
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
985
|
-
path: _path + ".deprecated",
|
986
|
-
expected: "(boolean | undefined)",
|
987
|
-
value: input.deprecated
|
988
|
-
}, errorFactory)) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
989
|
-
path: _path + "[\"x-typia-optional\"]",
|
990
|
-
expected: "(boolean | undefined)",
|
991
|
-
value: input["x-typia-optional"]
|
992
|
-
}, errorFactory)) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
993
|
-
path: _path + "[\"x-typia-rest\"]",
|
994
|
-
expected: "(boolean | undefined)",
|
995
|
-
value: input["x-typia-rest"]
|
996
|
-
}, errorFactory));
|
997
|
-
const $ao21 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
998
|
-
const value = input[key];
|
999
|
-
if (undefined === value)
|
1000
|
-
return true;
|
1001
|
-
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
1002
|
-
path: _path + $join(key),
|
1003
|
-
expected: "ISwaggerRouteRequestBody",
|
1004
|
-
value: value
|
1005
|
-
}, errorFactory)) && $ao22(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1006
|
-
path: _path + $join(key),
|
1007
|
-
expected: "ISwaggerRouteRequestBody",
|
1008
|
-
value: value
|
1009
|
-
}, errorFactory);
|
1010
|
-
});
|
1011
|
-
const $ao22 = (input, _path, _exceptionable = true) => (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1012
|
-
path: _path + ".description",
|
1013
|
-
expected: "(string | undefined)",
|
1014
|
-
value: input.description
|
1015
|
-
}, errorFactory)) && (undefined === input.required || "boolean" === typeof input.required || $guard(_exceptionable, {
|
1016
|
-
path: _path + ".required",
|
1017
|
-
expected: "(boolean | undefined)",
|
1018
|
-
value: input.required
|
1019
|
-
}, errorFactory)) && (undefined === input.content || ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) || $guard(_exceptionable, {
|
1020
|
-
path: _path + ".content",
|
1021
|
-
expected: "(ISwaggerRouteBodyContent | undefined)",
|
1022
|
-
value: input.content
|
1023
|
-
}, errorFactory)) && $ao23(input.content, _path + ".content", true && _exceptionable) || $guard(_exceptionable, {
|
1024
|
-
path: _path + ".content",
|
1025
|
-
expected: "(ISwaggerRouteBodyContent | undefined)",
|
1026
|
-
value: input.content
|
1027
|
-
}, errorFactory));
|
1028
|
-
const $ao23 = (input, _path, _exceptionable = true) => (undefined === input["text/plain"] || ("object" === typeof input["text/plain"] && null !== input["text/plain"] && false === Array.isArray(input["text/plain"]) || $guard(_exceptionable, {
|
1029
|
-
path: _path + "[\"text/plain\"]",
|
1030
|
-
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1031
|
-
value: input["text/plain"]
|
1032
|
-
}, errorFactory)) && $ao24(input["text/plain"], _path + "[\"text/plain\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1033
|
-
path: _path + "[\"text/plain\"]",
|
1034
|
-
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1035
|
-
value: input["text/plain"]
|
1036
|
-
}, errorFactory)) && (undefined === input["application/json"] || ("object" === typeof input["application/json"] && null !== input["application/json"] && false === Array.isArray(input["application/json"]) || $guard(_exceptionable, {
|
1037
|
-
path: _path + "[\"application/json\"]",
|
1038
|
-
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1039
|
-
value: input["application/json"]
|
1040
|
-
}, errorFactory)) && $ao24(input["application/json"], _path + "[\"application/json\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1041
|
-
path: _path + "[\"application/json\"]",
|
1042
|
-
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1043
|
-
value: input["application/json"]
|
1044
|
-
}, errorFactory)) && (undefined === input["application/x-www-form-urlencoded"] || ("object" === typeof input["application/x-www-form-urlencoded"] && null !== input["application/x-www-form-urlencoded"] && false === Array.isArray(input["application/x-www-form-urlencoded"]) || $guard(_exceptionable, {
|
1045
|
-
path: _path + "[\"application/x-www-form-urlencoded\"]",
|
1046
|
-
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1047
|
-
value: input["application/x-www-form-urlencoded"]
|
1048
|
-
}, errorFactory)) && $ao24(input["application/x-www-form-urlencoded"], _path + "[\"application/x-www-form-urlencoded\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1049
|
-
path: _path + "[\"application/x-www-form-urlencoded\"]",
|
1050
|
-
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1051
|
-
value: input["application/x-www-form-urlencoded"]
|
1052
|
-
}, errorFactory)) && (undefined === input["multipart/form-data"] || ("object" === typeof input["multipart/form-data"] && null !== input["multipart/form-data"] && false === Array.isArray(input["multipart/form-data"]) || $guard(_exceptionable, {
|
1053
|
-
path: _path + "[\"multipart/form-data\"]",
|
1054
|
-
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1055
|
-
value: input["multipart/form-data"]
|
1056
|
-
}, errorFactory)) && $ao24(input["multipart/form-data"], _path + "[\"multipart/form-data\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1057
|
-
path: _path + "[\"multipart/form-data\"]",
|
1058
|
-
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1059
|
-
value: input["multipart/form-data"]
|
1060
|
-
}, errorFactory)) && (undefined === input["*/*"] || ("object" === typeof input["*/*"] && null !== input["*/*"] && false === Array.isArray(input["*/*"]) || $guard(_exceptionable, {
|
1061
|
-
path: _path + "[\"*/*\"]",
|
1062
|
-
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1063
|
-
value: input["*/*"]
|
1064
|
-
}, errorFactory)) && $ao24(input["*/*"], _path + "[\"*/*\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1065
|
-
path: _path + "[\"*/*\"]",
|
1066
|
-
expected: "(ISwaggerRouteBodyContent.IMediaType | undefined)",
|
1067
|
-
value: input["*/*"]
|
1068
|
-
}, errorFactory));
|
1069
|
-
const $ao24 = (input, _path, _exceptionable = true) => (undefined === input.schema || ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $guard(_exceptionable, {
|
1070
|
-
path: _path + ".schema",
|
1071
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | undefined)",
|
1072
|
-
value: input.schema
|
1073
|
-
}, errorFactory)) && $au0(input.schema, _path + ".schema", true && _exceptionable) || $guard(_exceptionable, {
|
1074
|
-
path: _path + ".schema",
|
1075
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | undefined)",
|
1076
|
-
value: input.schema
|
1077
|
-
}, errorFactory)) && (undefined === input["x-nestia-encrypted"] || "boolean" === typeof input["x-nestia-encrypted"] || $guard(_exceptionable, {
|
1078
|
-
path: _path + "[\"x-nestia-encrypted\"]",
|
1079
|
-
expected: "(boolean | undefined)",
|
1080
|
-
value: input["x-nestia-encrypted"]
|
1081
|
-
}, errorFactory));
|
1082
|
-
const $ao25 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1083
|
-
const value = input[key];
|
1084
|
-
if (undefined === value)
|
1085
|
-
return true;
|
1086
|
-
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
1087
|
-
path: _path + $join(key),
|
1088
|
-
expected: "ISwaggerRouteResponse",
|
1089
|
-
value: value
|
1090
|
-
}, errorFactory)) && $ao26(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1091
|
-
path: _path + $join(key),
|
1092
|
-
expected: "ISwaggerRouteResponse",
|
1093
|
-
value: value
|
1094
|
-
}, errorFactory);
|
1095
|
-
});
|
1096
|
-
const $ao26 = (input, _path, _exceptionable = true) => (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1097
|
-
path: _path + ".description",
|
1098
|
-
expected: "(string | undefined)",
|
1099
|
-
value: input.description
|
1100
|
-
}, errorFactory)) && (undefined === input.content || ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) || $guard(_exceptionable, {
|
1101
|
-
path: _path + ".content",
|
1102
|
-
expected: "(ISwaggerRouteBodyContent | undefined)",
|
1103
|
-
value: input.content
|
1104
|
-
}, errorFactory)) && $ao23(input.content, _path + ".content", true && _exceptionable) || $guard(_exceptionable, {
|
1105
|
-
path: _path + ".content",
|
1106
|
-
expected: "(ISwaggerRouteBodyContent | undefined)",
|
1107
|
-
value: input.content
|
1108
|
-
}, errorFactory));
|
1109
|
-
const $ao27 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1110
|
-
const value = input[key];
|
1111
|
-
if (undefined === value)
|
1112
|
-
return true;
|
1113
|
-
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
1114
|
-
path: _path + $join(key),
|
1115
|
-
expected: "(ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IOAuth2 | ISwaggerSecurityScheme.IOpenId)",
|
1116
|
-
value: value
|
1117
|
-
}, errorFactory)) && $au2(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1118
|
-
path: _path + $join(key),
|
1119
|
-
expected: "(ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IOAuth2 | ISwaggerSecurityScheme.IOpenId)",
|
1120
|
-
value: value
|
1121
|
-
}, errorFactory);
|
1122
|
-
});
|
1123
|
-
const $ao28 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
1124
|
-
path: _path + ".type",
|
1125
|
-
expected: "\"http\"",
|
1126
|
-
value: input.type
|
1127
|
-
}, errorFactory)) && ("basic" === input.scheme || $guard(_exceptionable, {
|
1128
|
-
path: _path + ".scheme",
|
1129
|
-
expected: "\"basic\"",
|
1130
|
-
value: input.scheme
|
1131
|
-
}, errorFactory));
|
1132
|
-
const $ao29 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
1133
|
-
path: _path + ".type",
|
1134
|
-
expected: "\"http\"",
|
1135
|
-
value: input.type
|
1136
|
-
}, errorFactory)) && ("bearer" === input.scheme || $guard(_exceptionable, {
|
1137
|
-
path: _path + ".scheme",
|
1138
|
-
expected: "\"bearer\"",
|
1139
|
-
value: input.scheme
|
1140
|
-
}, errorFactory)) && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat || $guard(_exceptionable, {
|
1141
|
-
path: _path + ".bearerFormat",
|
1142
|
-
expected: "(string | undefined)",
|
1143
|
-
value: input.bearerFormat
|
1144
|
-
}, errorFactory));
|
1145
|
-
const $ao30 = (input, _path, _exceptionable = true) => ("apiKey" === input.type || $guard(_exceptionable, {
|
1146
|
-
path: _path + ".type",
|
1147
|
-
expected: "\"apiKey\"",
|
1148
|
-
value: input.type
|
1149
|
-
}, errorFactory)) && (undefined === input["in"] || "cookie" === input["in"] || "header" === input["in"] || "query" === input["in"] || $guard(_exceptionable, {
|
1150
|
-
path: _path + "[\"in\"]",
|
1151
|
-
expected: "(\"cookie\" | \"header\" | \"query\" | undefined)",
|
1152
|
-
value: input["in"]
|
1153
|
-
}, errorFactory)) && (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
1154
|
-
path: _path + ".name",
|
1155
|
-
expected: "(string | undefined)",
|
1156
|
-
value: input.name
|
1157
|
-
}, errorFactory));
|
1158
|
-
const $ao31 = (input, _path, _exceptionable = true) => ("openIdConnect" === input.type || $guard(_exceptionable, {
|
1159
|
-
path: _path + ".type",
|
1160
|
-
expected: "\"openIdConnect\"",
|
1161
|
-
value: input.type
|
1162
|
-
}, errorFactory)) && ("string" === typeof input.openIdConnectUrl || $guard(_exceptionable, {
|
1163
|
-
path: _path + ".openIdConnectUrl",
|
1164
|
-
expected: "string",
|
1165
|
-
value: input.openIdConnectUrl
|
1166
|
-
}, errorFactory));
|
1167
|
-
const $ao32 = (input, _path, _exceptionable = true) => ("oauth2" === input.type || $guard(_exceptionable, {
|
1168
|
-
path: _path + ".type",
|
1169
|
-
expected: "\"oauth2\"",
|
1170
|
-
value: input.type
|
1171
|
-
}, errorFactory)) && (("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) || $guard(_exceptionable, {
|
1172
|
-
path: _path + ".flows",
|
1173
|
-
expected: "ISwaggerSecurityScheme.IOAuth2.IFlowSet",
|
1174
|
-
value: input.flows
|
1175
|
-
}, errorFactory)) && $ao33(input.flows, _path + ".flows", true && _exceptionable) || $guard(_exceptionable, {
|
1176
|
-
path: _path + ".flows",
|
1177
|
-
expected: "ISwaggerSecurityScheme.IOAuth2.IFlowSet",
|
1178
|
-
value: input.flows
|
1179
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1180
|
-
path: _path + ".description",
|
1181
|
-
expected: "(string | undefined)",
|
1182
|
-
value: input.description
|
1183
|
-
}, errorFactory));
|
1184
|
-
const $ao33 = (input, _path, _exceptionable = true) => (undefined === input.authorizationCode || ("object" === typeof input.authorizationCode && null !== input.authorizationCode || $guard(_exceptionable, {
|
1185
|
-
path: _path + ".authorizationCode",
|
1186
|
-
expected: "(ISwaggerSecurityScheme.IOAuth2.IFlow | undefined)",
|
1187
|
-
value: input.authorizationCode
|
1188
|
-
}, errorFactory)) && $ao34(input.authorizationCode, _path + ".authorizationCode", true && _exceptionable) || $guard(_exceptionable, {
|
1189
|
-
path: _path + ".authorizationCode",
|
1190
|
-
expected: "(ISwaggerSecurityScheme.IOAuth2.IFlow | undefined)",
|
1191
|
-
value: input.authorizationCode
|
1192
|
-
}, errorFactory)) && (undefined === input.implicit || ("object" === typeof input.implicit && null !== input.implicit || $guard(_exceptionable, {
|
1193
|
-
path: _path + ".implicit",
|
1194
|
-
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
1195
|
-
value: input.implicit
|
1196
|
-
}, errorFactory)) && $ao36(input.implicit, _path + ".implicit", true && _exceptionable) || $guard(_exceptionable, {
|
1197
|
-
path: _path + ".implicit",
|
1198
|
-
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
1199
|
-
value: input.implicit
|
1200
|
-
}, errorFactory)) && (undefined === input.password || ("object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) || $guard(_exceptionable, {
|
1201
|
-
path: _path + ".password",
|
1202
|
-
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1203
|
-
value: input.password
|
1204
|
-
}, errorFactory)) && $ao37(input.password, _path + ".password", true && _exceptionable) || $guard(_exceptionable, {
|
1205
|
-
path: _path + ".password",
|
1206
|
-
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1207
|
-
value: input.password
|
1208
|
-
}, errorFactory)) && (undefined === input.clientCredentials || ("object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) || $guard(_exceptionable, {
|
1209
|
-
path: _path + ".clientCredentials",
|
1210
|
-
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1211
|
-
value: input.clientCredentials
|
1212
|
-
}, errorFactory)) && $ao37(input.clientCredentials, _path + ".clientCredentials", true && _exceptionable) || $guard(_exceptionable, {
|
1213
|
-
path: _path + ".clientCredentials",
|
1214
|
-
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1215
|
-
value: input.clientCredentials
|
1216
|
-
}, errorFactory));
|
1217
|
-
const $ao34 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
1218
|
-
path: _path + ".authorizationUrl",
|
1219
|
-
expected: "string",
|
1220
|
-
value: input.authorizationUrl
|
1221
|
-
}, errorFactory)) && (undefined === input.tokenUrl || "string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
1222
|
-
path: _path + ".tokenUrl",
|
1223
|
-
expected: "(string | undefined)",
|
1224
|
-
value: input.tokenUrl
|
1225
|
-
}, errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
1226
|
-
path: _path + ".refreshUrl",
|
1227
|
-
expected: "(string | undefined)",
|
1228
|
-
value: input.refreshUrl
|
1229
|
-
}, errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
1230
|
-
path: _path + ".scopes",
|
1231
|
-
expected: "(Record<string, string> | undefined)",
|
1232
|
-
value: input.scopes
|
1233
|
-
}, errorFactory)) && $ao35(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
1234
|
-
path: _path + ".scopes",
|
1235
|
-
expected: "(Record<string, string> | undefined)",
|
1236
|
-
value: input.scopes
|
1237
|
-
}, errorFactory));
|
1238
|
-
const $ao35 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1239
|
-
const value = input[key];
|
1240
|
-
if (undefined === value)
|
1241
|
-
return true;
|
1242
|
-
return "string" === typeof value || $guard(_exceptionable, {
|
1243
|
-
path: _path + $join(key),
|
1244
|
-
expected: "string",
|
1245
|
-
value: value
|
1246
|
-
}, errorFactory);
|
1247
|
-
});
|
1248
|
-
const $ao36 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
1249
|
-
path: _path + ".authorizationUrl",
|
1250
|
-
expected: "string",
|
1251
|
-
value: input.authorizationUrl
|
1252
|
-
}, errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
1253
|
-
path: _path + ".refreshUrl",
|
1254
|
-
expected: "(string | undefined)",
|
1255
|
-
value: input.refreshUrl
|
1256
|
-
}, errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
1257
|
-
path: _path + ".scopes",
|
1258
|
-
expected: "(Record<string, string> | undefined)",
|
1259
|
-
value: input.scopes
|
1260
|
-
}, errorFactory)) && $ao35(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
1261
|
-
path: _path + ".scopes",
|
1262
|
-
expected: "(Record<string, string> | undefined)",
|
1263
|
-
value: input.scopes
|
1264
|
-
}, errorFactory));
|
1265
|
-
const $ao37 = (input, _path, _exceptionable = true) => (undefined === input.tokenUrl || "string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
1266
|
-
path: _path + ".tokenUrl",
|
1267
|
-
expected: "(string | undefined)",
|
1268
|
-
value: input.tokenUrl
|
1269
|
-
}, errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
1270
|
-
path: _path + ".refreshUrl",
|
1271
|
-
expected: "(string | undefined)",
|
1272
|
-
value: input.refreshUrl
|
1273
|
-
}, errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
1274
|
-
path: _path + ".scopes",
|
1275
|
-
expected: "(Record<string, string> | undefined)",
|
1276
|
-
value: input.scopes
|
1277
|
-
}, errorFactory)) && $ao35(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
1278
|
-
path: _path + ".scopes",
|
1279
|
-
expected: "(Record<string, string> | undefined)",
|
1280
|
-
value: input.scopes
|
1281
|
-
}, errorFactory));
|
1282
|
-
const $ao38 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1283
|
-
const value = input[key];
|
1284
|
-
if (undefined === value)
|
1285
|
-
return true;
|
1286
|
-
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
1287
|
-
path: _path + $join(key),
|
1288
|
-
expected: "ISwagger.IPath",
|
1289
|
-
value: value
|
1290
|
-
}, errorFactory)) && $ao39(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1291
|
-
path: _path + $join(key),
|
1292
|
-
expected: "ISwagger.IPath",
|
1293
|
-
value: value
|
1294
|
-
}, errorFactory);
|
1295
|
-
});
|
1296
|
-
const $ao39 = (input, _path, _exceptionable = true) => (undefined === input.get || ("object" === typeof input.get && null !== input.get && false === Array.isArray(input.get) || $guard(_exceptionable, {
|
1297
|
-
path: _path + ".get",
|
1298
|
-
expected: "(ISwaggerRoute | undefined)",
|
1299
|
-
value: input.get
|
1300
|
-
}, errorFactory)) && $ao40(input.get, _path + ".get", true && _exceptionable) || $guard(_exceptionable, {
|
1301
|
-
path: _path + ".get",
|
1302
|
-
expected: "(ISwaggerRoute | undefined)",
|
1303
|
-
value: input.get
|
1304
|
-
}, errorFactory)) && (undefined === input.post || ("object" === typeof input.post && null !== input.post && false === Array.isArray(input.post) || $guard(_exceptionable, {
|
1305
|
-
path: _path + ".post",
|
1306
|
-
expected: "(ISwaggerRoute | undefined)",
|
1307
|
-
value: input.post
|
1308
|
-
}, errorFactory)) && $ao40(input.post, _path + ".post", true && _exceptionable) || $guard(_exceptionable, {
|
1309
|
-
path: _path + ".post",
|
1310
|
-
expected: "(ISwaggerRoute | undefined)",
|
1311
|
-
value: input.post
|
1312
|
-
}, errorFactory)) && (undefined === input.patch || ("object" === typeof input.patch && null !== input.patch && false === Array.isArray(input.patch) || $guard(_exceptionable, {
|
1313
|
-
path: _path + ".patch",
|
1314
|
-
expected: "(ISwaggerRoute | undefined)",
|
1315
|
-
value: input.patch
|
1316
|
-
}, errorFactory)) && $ao40(input.patch, _path + ".patch", true && _exceptionable) || $guard(_exceptionable, {
|
1317
|
-
path: _path + ".patch",
|
1318
|
-
expected: "(ISwaggerRoute | undefined)",
|
1319
|
-
value: input.patch
|
1320
|
-
}, errorFactory)) && (undefined === input.put || ("object" === typeof input.put && null !== input.put && false === Array.isArray(input.put) || $guard(_exceptionable, {
|
1321
|
-
path: _path + ".put",
|
1322
|
-
expected: "(ISwaggerRoute | undefined)",
|
1323
|
-
value: input.put
|
1324
|
-
}, errorFactory)) && $ao40(input.put, _path + ".put", true && _exceptionable) || $guard(_exceptionable, {
|
1325
|
-
path: _path + ".put",
|
1326
|
-
expected: "(ISwaggerRoute | undefined)",
|
1327
|
-
value: input.put
|
1328
|
-
}, errorFactory)) && (undefined === input["delete"] || ("object" === typeof input["delete"] && null !== input["delete"] && false === Array.isArray(input["delete"]) || $guard(_exceptionable, {
|
1329
|
-
path: _path + "[\"delete\"]",
|
1330
|
-
expected: "(ISwaggerRoute | undefined)",
|
1331
|
-
value: input["delete"]
|
1332
|
-
}, errorFactory)) && $ao40(input["delete"], _path + "[\"delete\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1333
|
-
path: _path + "[\"delete\"]",
|
1334
|
-
expected: "(ISwaggerRoute | undefined)",
|
1335
|
-
value: input["delete"]
|
1336
|
-
}, errorFactory));
|
1337
|
-
const $ao40 = (input, _path, _exceptionable = true) => (undefined === input.parameters || (Array.isArray(input.parameters) || $guard(_exceptionable, {
|
1338
|
-
path: _path + ".parameters",
|
1339
|
-
expected: "(Array<ISwaggerRouteParameter | IReference> | undefined)",
|
1340
|
-
value: input.parameters
|
1341
|
-
}, errorFactory)) && input.parameters.every((elem, _index11) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
1342
|
-
path: _path + ".parameters[" + _index11 + "]",
|
1343
|
-
expected: "(ISwaggerRouteParameter | ISwaggerRouteParameter.IReference)",
|
1344
|
-
value: elem
|
1345
|
-
}, errorFactory)) && $au1(elem, _path + ".parameters[" + _index11 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1346
|
-
path: _path + ".parameters[" + _index11 + "]",
|
1347
|
-
expected: "(ISwaggerRouteParameter | ISwaggerRouteParameter.IReference)",
|
1348
|
-
value: elem
|
1349
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
1350
|
-
path: _path + ".parameters",
|
1351
|
-
expected: "(Array<ISwaggerRouteParameter | IReference> | undefined)",
|
1352
|
-
value: input.parameters
|
1353
|
-
}, errorFactory)) && (undefined === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody && false === Array.isArray(input.requestBody) || $guard(_exceptionable, {
|
1354
|
-
path: _path + ".requestBody",
|
1355
|
-
expected: "(ISwaggerRouteRequestBody | undefined)",
|
1356
|
-
value: input.requestBody
|
1357
|
-
}, errorFactory)) && $ao22(input.requestBody, _path + ".requestBody", true && _exceptionable) || $guard(_exceptionable, {
|
1358
|
-
path: _path + ".requestBody",
|
1359
|
-
expected: "(ISwaggerRouteRequestBody | undefined)",
|
1360
|
-
value: input.requestBody
|
1361
|
-
}, errorFactory)) && (undefined === input.responses || ("object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) || $guard(_exceptionable, {
|
1362
|
-
path: _path + ".responses",
|
1363
|
-
expected: "(Record<string, ISwaggerRouteResponse | IReference> | undefined)",
|
1364
|
-
value: input.responses
|
1365
|
-
}, errorFactory)) && $ao42(input.responses, _path + ".responses", true && _exceptionable) || $guard(_exceptionable, {
|
1366
|
-
path: _path + ".responses",
|
1367
|
-
expected: "(Record<string, ISwaggerRouteResponse | IReference> | undefined)",
|
1368
|
-
value: input.responses
|
1369
|
-
}, errorFactory)) && (undefined === input.summary || "string" === typeof input.summary || $guard(_exceptionable, {
|
1370
|
-
path: _path + ".summary",
|
1371
|
-
expected: "(string | undefined)",
|
1372
|
-
value: input.summary
|
1373
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1374
|
-
path: _path + ".description",
|
1375
|
-
expected: "(string | undefined)",
|
1376
|
-
value: input.description
|
1377
|
-
}, errorFactory)) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
1378
|
-
path: _path + ".deprecated",
|
1379
|
-
expected: "(boolean | undefined)",
|
1380
|
-
value: input.deprecated
|
1381
|
-
}, errorFactory)) && (undefined === input.security || (Array.isArray(input.security) || $guard(_exceptionable, {
|
1382
|
-
path: _path + ".security",
|
1383
|
-
expected: "(Array<Record<string, Array<string>>> | undefined)",
|
1384
|
-
value: input.security
|
1385
|
-
}, errorFactory)) && input.security.every((elem, _index12) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
1386
|
-
path: _path + ".security[" + _index12 + "]",
|
1387
|
-
expected: "Record<string, Array<string>>",
|
1388
|
-
value: elem
|
1389
|
-
}, errorFactory)) && $ao44(elem, _path + ".security[" + _index12 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1390
|
-
path: _path + ".security[" + _index12 + "]",
|
1391
|
-
expected: "Record<string, Array<string>>",
|
1392
|
-
value: elem
|
1393
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
1394
|
-
path: _path + ".security",
|
1395
|
-
expected: "(Array<Record<string, Array<string>>> | undefined)",
|
1396
|
-
value: input.security
|
1397
|
-
}, errorFactory)) && (undefined === input.tags || (Array.isArray(input.tags) || $guard(_exceptionable, {
|
1398
|
-
path: _path + ".tags",
|
1399
|
-
expected: "(Array<string> | undefined)",
|
1400
|
-
value: input.tags
|
1401
|
-
}, errorFactory)) && input.tags.every((elem, _index13) => "string" === typeof elem || $guard(_exceptionable, {
|
1402
|
-
path: _path + ".tags[" + _index13 + "]",
|
1403
|
-
expected: "string",
|
1404
|
-
value: elem
|
1405
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
1406
|
-
path: _path + ".tags",
|
1407
|
-
expected: "(Array<string> | undefined)",
|
1408
|
-
value: input.tags
|
1409
|
-
}, errorFactory)) && (undefined === input["x-nestia-jsDocTags"] || (Array.isArray(input["x-nestia-jsDocTags"]) || $guard(_exceptionable, {
|
1410
|
-
path: _path + "[\"x-nestia-jsDocTags\"]",
|
1411
|
-
expected: "(Array<IJsDocTagInfo> | undefined)",
|
1412
|
-
value: input["x-nestia-jsDocTags"]
|
1413
|
-
}, errorFactory)) && input["x-nestia-jsDocTags"].every((elem, _index14) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
1414
|
-
path: _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]",
|
1415
|
-
expected: "IJsDocTagInfo",
|
1416
|
-
value: elem
|
1417
|
-
}, errorFactory)) && $ao45(elem, _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1418
|
-
path: _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]",
|
1419
|
-
expected: "IJsDocTagInfo",
|
1420
|
-
value: elem
|
1421
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
1422
|
-
path: _path + "[\"x-nestia-jsDocTags\"]",
|
1423
|
-
expected: "(Array<IJsDocTagInfo> | undefined)",
|
1424
|
-
value: input["x-nestia-jsDocTags"]
|
1425
|
-
}, errorFactory));
|
1426
|
-
const $ao41 = (input, _path, _exceptionable = true) => "string" === typeof input.$ref && RegExp(/^#\/components\/parameters\/(.*)/).test(input.$ref) || $guard(_exceptionable, {
|
1427
|
-
path: _path + ".$ref",
|
1428
|
-
expected: "`#/components/parameters/${string}`",
|
1429
|
-
value: input.$ref
|
1430
|
-
}, errorFactory);
|
1431
|
-
const $ao42 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1432
|
-
const value = input[key];
|
1433
|
-
if (undefined === value)
|
1434
|
-
return true;
|
1435
|
-
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
1436
|
-
path: _path + $join(key),
|
1437
|
-
expected: "(ISwaggerRouteResponse | ISwaggerRouteResponse.IReference)",
|
1438
|
-
value: value
|
1439
|
-
}, errorFactory)) && $au3(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1440
|
-
path: _path + $join(key),
|
1441
|
-
expected: "(ISwaggerRouteResponse | ISwaggerRouteResponse.IReference)",
|
1442
|
-
value: value
|
1443
|
-
}, errorFactory);
|
1444
|
-
});
|
1445
|
-
const $ao43 = (input, _path, _exceptionable = true) => "string" === typeof input.$ref && RegExp(/^#\/components\/responses\/(.*)/).test(input.$ref) || $guard(_exceptionable, {
|
1446
|
-
path: _path + ".$ref",
|
1447
|
-
expected: "`#/components/responses/${string}`",
|
1448
|
-
value: input.$ref
|
1449
|
-
}, errorFactory);
|
1450
|
-
const $ao44 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1451
|
-
const value = input[key];
|
1452
|
-
if (undefined === value)
|
1453
|
-
return true;
|
1454
|
-
return (Array.isArray(value) || $guard(_exceptionable, {
|
1455
|
-
path: _path + $join(key),
|
1456
|
-
expected: "Array<string>",
|
1457
|
-
value: value
|
1458
|
-
}, errorFactory)) && value.every((elem, _index15) => "string" === typeof elem || $guard(_exceptionable, {
|
1459
|
-
path: _path + $join(key) + "[" + _index15 + "]",
|
1460
|
-
expected: "string",
|
1461
|
-
value: elem
|
1462
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
1463
|
-
path: _path + $join(key),
|
1464
|
-
expected: "Array<string>",
|
1465
|
-
value: value
|
1466
|
-
}, errorFactory);
|
1467
|
-
});
|
1468
|
-
const $ao45 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
|
1469
|
-
path: _path + ".name",
|
1470
|
-
expected: "string",
|
1471
|
-
value: input.name
|
1472
|
-
}, errorFactory)) && (undefined === input.text || (Array.isArray(input.text) || $guard(_exceptionable, {
|
1473
|
-
path: _path + ".text",
|
1474
|
-
expected: "(Array<IJsDocTagInfo.IText> | undefined)",
|
1475
|
-
value: input.text
|
1476
|
-
}, errorFactory)) && input.text.every((elem, _index16) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
1477
|
-
path: _path + ".text[" + _index16 + "]",
|
1478
|
-
expected: "IJsDocTagInfo.IText",
|
1479
|
-
value: elem
|
1480
|
-
}, errorFactory)) && $ao46(elem, _path + ".text[" + _index16 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1481
|
-
path: _path + ".text[" + _index16 + "]",
|
1482
|
-
expected: "IJsDocTagInfo.IText",
|
1483
|
-
value: elem
|
1484
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
1485
|
-
path: _path + ".text",
|
1486
|
-
expected: "(Array<IJsDocTagInfo.IText> | undefined)",
|
1487
|
-
value: input.text
|
1488
|
-
}, errorFactory));
|
1489
|
-
const $ao46 = (input, _path, _exceptionable = true) => ("string" === typeof input.text || $guard(_exceptionable, {
|
1490
|
-
path: _path + ".text",
|
1491
|
-
expected: "string",
|
1492
|
-
value: input.text
|
1493
|
-
}, errorFactory)) && ("string" === typeof input.kind || $guard(_exceptionable, {
|
1494
|
-
path: _path + ".kind",
|
1495
|
-
expected: "string",
|
1496
|
-
value: input.kind
|
1497
|
-
}, errorFactory));
|
1498
|
-
const $au0 = (input, _path, _exceptionable = true) => (() => {
|
1499
|
-
if ("null" === input.type)
|
1500
|
-
return $ao9(input, _path, true && _exceptionable);
|
1501
|
-
else if (undefined !== input.anyOf)
|
1502
|
-
return $ao10(input, _path, true && _exceptionable);
|
1503
|
-
else if (undefined !== input.oneOf)
|
1504
|
-
return $ao11(input, _path, true && _exceptionable);
|
1505
|
-
else if ("boolean" === input.type)
|
1506
|
-
return $ao12(input, _path, true && _exceptionable);
|
1507
|
-
else if ("number" === input.type)
|
1508
|
-
return $ao14(input, _path, true && _exceptionable);
|
1509
|
-
else if ("integer" === input.type)
|
1510
|
-
return $ao13(input, _path, true && _exceptionable);
|
1511
|
-
else if ("string" === input.type)
|
1512
|
-
return $ao15(input, _path, true && _exceptionable);
|
1513
|
-
else if ("array" === input.type)
|
1514
|
-
return $ao16(input, _path, true && _exceptionable);
|
1515
|
-
else if ("object" === input.type)
|
1516
|
-
return $ao17(input, _path, true && _exceptionable);
|
1517
|
-
else if (undefined !== input.$ref)
|
1518
|
-
return $ao19(input, _path, true && _exceptionable);
|
1519
|
-
else
|
1520
|
-
return $ao8(input, _path, true && _exceptionable);
|
1521
|
-
})();
|
1522
|
-
const $au1 = (input, _path, _exceptionable = true) => (() => {
|
1523
|
-
if (undefined !== input["in"])
|
1524
|
-
return $ao7(input, _path, true && _exceptionable);
|
1525
|
-
else if (undefined !== input.$ref)
|
1526
|
-
return $ao41(input, _path, true && _exceptionable);
|
1527
|
-
else
|
1528
|
-
return $guard(_exceptionable, {
|
1529
|
-
path: _path,
|
1530
|
-
expected: "(ISwaggerRouteParameter | ISwaggerRouteParameter.IReference)",
|
1531
|
-
value: input
|
1532
|
-
}, errorFactory);
|
1533
|
-
})();
|
1534
|
-
const $au2 = (input, _path, _exceptionable = true) => (() => {
|
1535
|
-
if ("basic" === input.scheme)
|
1536
|
-
return $ao28(input, _path, true && _exceptionable);
|
1537
|
-
else if ("bearer" === input.scheme)
|
1538
|
-
return $ao29(input, _path, true && _exceptionable);
|
1539
|
-
else if ("apiKey" === input.type)
|
1540
|
-
return $ao30(input, _path, true && _exceptionable);
|
1541
|
-
else if ("openIdConnect" === input.type)
|
1542
|
-
return $ao31(input, _path, true && _exceptionable);
|
1543
|
-
else if ("oauth2" === input.type)
|
1544
|
-
return $ao32(input, _path, true && _exceptionable);
|
1545
|
-
else
|
1546
|
-
return $guard(_exceptionable, {
|
1547
|
-
path: _path,
|
1548
|
-
expected: "(ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IOpenId | ISwaggerSecurityScheme.IOAuth2)",
|
1549
|
-
value: input
|
1550
|
-
}, errorFactory);
|
1551
|
-
})();
|
1552
|
-
const $au3 = (input, _path, _exceptionable = true) => (() => {
|
1553
|
-
if (undefined !== input.$ref)
|
1554
|
-
return $ao43(input, _path, true && _exceptionable);
|
1555
|
-
else
|
1556
|
-
return $ao26(input, _path, true && _exceptionable);
|
1557
|
-
})();
|
1558
|
-
return ("object" === typeof input && null !== input || $guard(true, {
|
1559
|
-
path: _path + "",
|
1560
|
-
expected: "ISwagger",
|
1561
|
-
value: input
|
1562
|
-
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
1563
|
-
path: _path + "",
|
1564
|
-
expected: "ISwagger",
|
1565
|
-
value: input
|
1566
|
-
}, errorFactory);
|
1567
|
-
})(input, "$input", true);
|
1568
|
-
return input;
|
1569
|
-
})(converter.convert());
|
1570
|
-
};
|
1571
|
-
})(OpenApiConverter || (exports.OpenApiConverter = OpenApiConverter = {}));
|
1572
|
-
//# sourceMappingURL=OpenApiConverter.js.map
|