@nestia/migrate 0.9.7 → 0.11.0

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