@nestia/migrate 0.12.0 → 0.13.0-dev.20240411

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