@nestia/migrate 0.11.2 → 0.11.3

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