@nestia/migrate 0.9.5 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/MigrateApplication.js +268 -192
- package/lib/MigrateApplication.js.map +1 -1
- package/lib/analyzers/MigrateControllerAnalyzer.js +5 -0
- package/lib/analyzers/MigrateControllerAnalyzer.js.map +1 -1
- package/lib/analyzers/MigrateMethodAnalyzer.js +103 -31
- package/lib/analyzers/MigrateMethodAnalyzer.js.map +1 -1
- package/lib/bundles/NEST_TEMPLATE.js +2 -2
- package/lib/bundles/NEST_TEMPLATE.js.map +1 -1
- package/lib/bundles/SDK_TEMPLATE.js +1 -1
- package/lib/bundles/SDK_TEMPLATE.js.map +1 -1
- package/lib/programmers/MigrateSchemaProgrammer.js +14 -12
- package/lib/programmers/MigrateSchemaProgrammer.js.map +1 -1
- package/lib/structures/ISwagger.d.ts +1 -1
- package/lib/structures/ISwaggerComponents.d.ts +2 -0
- package/lib/structures/ISwaggerRoute.d.ts +2 -8
- package/lib/structures/ISwaggerRouteParameter.d.ts +13 -0
- package/lib/structures/ISwaggerRouteParameter.js +3 -0
- package/lib/structures/ISwaggerRouteParameter.js.map +1 -0
- package/lib/utils/FilePrinter.d.ts +1 -1
- package/lib/utils/SwaggerTypeChecker.d.ts +4 -2
- package/lib/utils/SwaggerTypeChecker.js +31 -25
- package/lib/utils/SwaggerTypeChecker.js.map +1 -1
- package/package.json +5 -5
- package/src/analyzers/MigrateControllerAnalyzer.ts +7 -0
- package/src/analyzers/MigrateMethodAnalyzer.ts +95 -59
- package/src/bundles/NEST_TEMPLATE.ts +2 -2
- package/src/bundles/SDK_TEMPLATE.ts +1 -1
- package/src/programmers/MigrateSchemaProgrammer.ts +15 -15
- package/src/structures/ISwagger.ts +4 -1
- package/src/structures/ISwaggerComponents.ts +2 -0
- package/src/structures/ISwaggerRoute.ts +2 -8
- package/src/structures/ISwaggerRouteHeaders.ts +0 -0
- package/src/structures/ISwaggerRouteParameter.ts +14 -0
- package/src/structures/ISwaggerRouteRequestBody.ts +0 -0
- package/src/structures/ISwaggerRouteResponse.ts +0 -0
- package/src/utils/SwaggerTypeChecker.ts +17 -5
@@ -20,122 +20,132 @@ class MigrateApplication {
|
|
20
20
|
const result = (input => {
|
21
21
|
const errors = [];
|
22
22
|
const __is = input => {
|
23
|
-
const $io0 = input => "string" === typeof input.openapi && RegExp(/^3\.0\.[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(input.openapi) && ("object" === typeof input.info && null !== input.info && $io1(input.info)) && (Array.isArray(input.servers) && input.servers.every(elem => "object" === typeof elem && null !== elem && $io4(elem))) && ("object" === typeof input.components && null !== input.components && false === Array.isArray(input.components) && $io5(input.components)) && ("object" === typeof input.paths && null !== input.paths && false === Array.isArray(input.paths) && $
|
23
|
+
const $io0 = input => "string" === typeof input.openapi && RegExp(/^3\.0\.[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(input.openapi) && ("object" === typeof input.info && null !== input.info && $io1(input.info)) && (Array.isArray(input.servers) && input.servers.every(elem => "object" === typeof elem && null !== elem && $io4(elem))) && ("object" === typeof input.components && null !== input.components && false === Array.isArray(input.components) && $io5(input.components)) && ("object" === typeof input.paths && null !== input.paths && false === Array.isArray(input.paths) && $io32(input.paths)) && (undefined === input.security || Array.isArray(input.security) && input.security.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io45(elem)));
|
24
24
|
const $io1 = input => "string" === typeof input.title && (undefined === input.description || "string" === typeof input.description) && (undefined === input.termsOfService || "string" === typeof input.termsOfService && (/\/|:/.test(input.termsOfService) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.termsOfService))) && (undefined === input.contact || "object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) && $io2(input.contact)) && (undefined === input.license || "object" === typeof input.license && null !== input.license && $io3(input.license)) && "string" === typeof input.version;
|
25
25
|
const $io2 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.url || "string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url))) && (undefined === input.email || "string" === typeof input.email && /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(input.email));
|
26
26
|
const $io3 = input => "string" === typeof input.name && (undefined === input.url || "string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url)));
|
27
27
|
const $io4 = input => "string" === typeof input.url && (undefined === input.description || "string" === typeof input.description);
|
28
|
-
const $io5 = input => (undefined === input.schemas || "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && $
|
28
|
+
const $io5 = input => (undefined === input.parameters || "object" === typeof input.parameters && null !== input.parameters && false === Array.isArray(input.parameters) && $io6(input.parameters)) && (undefined === input.schemas || "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && $io18(input.schemas)) && (undefined === input.securitySchemes || "object" === typeof input.securitySchemes && null !== input.securitySchemes && false === Array.isArray(input.securitySchemes) && $io21(input.securitySchemes)) && (undefined === input.namespace || "string" === typeof input.namespace);
|
29
29
|
const $io6 = input => Object.keys(input).every(key => {
|
30
30
|
const value = input[key];
|
31
31
|
if (undefined === value)
|
32
32
|
return true;
|
33
|
-
return "object" === typeof value && null !== value &&
|
33
|
+
return "object" === typeof value && null !== value && $io7(value);
|
34
34
|
});
|
35
|
-
const $io7 = input =>
|
36
|
-
const $io8 = input =>
|
37
|
-
const $io9 = input =>
|
38
|
-
const $io10 = input => Array.isArray(input.
|
39
|
-
const $io11 = input =>
|
40
|
-
const $io12 = input => (undefined === input["default"] || "
|
41
|
-
const $io13 = 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) && "
|
42
|
-
const $io14 = input => (undefined === input["default"] || "
|
43
|
-
const $io15 = input => "
|
44
|
-
const $io16 = input =>
|
45
|
-
const $io17 = input => "string" === typeof input
|
46
|
-
const $io18 = input =>
|
47
|
-
const $io19 = input => Object.keys(input).every(key => {
|
35
|
+
const $io7 = input => (undefined === input.name || "string" === typeof input.name) && ("cookie" === input["in"] || "header" === input["in"] || "path" === input["in"] || "query" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description);
|
36
|
+
const $io8 = input => null !== input.type && undefined === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
37
|
+
const $io9 = input => "null" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
38
|
+
const $io10 = input => Array.isArray(input.anyOf) && input.anyOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $iu0(elem)) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
39
|
+
const $io11 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $iu0(elem)) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
40
|
+
const $io12 = input => (undefined === input["default"] || "boolean" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "boolean" === typeof elem)) && "boolean" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
41
|
+
const $io13 = input => (undefined === input["default"] || "number" === typeof input["default"] && (Math.floor(input["default"]) === input["default"] && -2147483648 <= input["default"] && input["default"] <= 2147483647)) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "number" === typeof elem)) && (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -2147483648 <= input.minimum && input.minimum <= 2147483647)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -2147483648 <= input.maximum && input.maximum <= 2147483647)) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 4294967295)) && "integer" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
42
|
+
const $io14 = input => (undefined === input["default"] || "number" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "number" === typeof elem)) && (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf) && "number" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
43
|
+
const $io15 = input => (undefined === input["default"] || "string" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "string" === typeof elem)) && (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 4294967295)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 4294967295)) && "string" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
44
|
+
const $io16 = input => "object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) && $iu0(input.items) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 4294967295)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 4294967295)) && (undefined === input["x-typia-tuple"] || "object" === typeof input["x-typia-tuple"] && null !== input["x-typia-tuple"] && $io20(input["x-typia-tuple"])) && "array" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
45
|
+
const $io17 = input => (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io18(input.properties)) && (undefined === input.required || Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && (null !== input.additionalProperties && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) && $iu0(input.additionalProperties))) && (undefined === input["x-typia-patternProperties"] || "object" === typeof input["x-typia-patternProperties"] && null !== input["x-typia-patternProperties"] && false === Array.isArray(input["x-typia-patternProperties"]) && $io18(input["x-typia-patternProperties"])) && "object" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
46
|
+
const $io18 = input => Object.keys(input).every(key => {
|
48
47
|
const value = input[key];
|
49
48
|
if (undefined === value)
|
50
49
|
return true;
|
51
|
-
return "object" === typeof value && null !== value && $
|
50
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $iu0(value);
|
52
51
|
});
|
53
|
-
const $
|
54
|
-
const $
|
55
|
-
const $
|
56
|
-
const $io23 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl;
|
57
|
-
const $io24 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && $io25(input.flows)) && (undefined === input.description || "string" === typeof input.description);
|
58
|
-
const $io25 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && $io26(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && $io28(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) && $io29(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) && $io29(input.clientCredentials));
|
59
|
-
const $io26 = 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) && $io27(input.scopes));
|
60
|
-
const $io27 = input => Object.keys(input).every(key => {
|
52
|
+
const $io19 = input => "string" === typeof input.$ref && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
53
|
+
const $io20 = input => Array.isArray(input.items) && input.items.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $iu0(elem)) && "array" === input.type && (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
54
|
+
const $io21 = input => Object.keys(input).every(key => {
|
61
55
|
const value = input[key];
|
62
56
|
if (undefined === value)
|
63
57
|
return true;
|
64
|
-
return "
|
58
|
+
return "object" === typeof value && null !== value && $iu2(value);
|
65
59
|
});
|
66
|
-
const $
|
67
|
-
const $
|
68
|
-
const $
|
60
|
+
const $io22 = input => "http" === input.type && "basic" === input.scheme;
|
61
|
+
const $io23 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat);
|
62
|
+
const $io24 = input => "apiKey" === input.type && (undefined === input["in"] || "cookie" === input["in"] || "header" === input["in"] || "query" === input["in"]) && (undefined === input.name || "string" === typeof input.name);
|
63
|
+
const $io25 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl;
|
64
|
+
const $io26 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && $io27(input.flows)) && (undefined === input.description || "string" === typeof input.description);
|
65
|
+
const $io27 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && $io28(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && $io30(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) && $io31(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) && $io31(input.clientCredentials));
|
66
|
+
const $io28 = input => "string" === typeof input.authorizationUrl && (undefined === input.tokenUrl || "string" === typeof input.tokenUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io29(input.scopes));
|
67
|
+
const $io29 = input => Object.keys(input).every(key => {
|
69
68
|
const value = input[key];
|
70
69
|
if (undefined === value)
|
71
70
|
return true;
|
72
|
-
return "
|
71
|
+
return "string" === typeof value;
|
73
72
|
});
|
74
|
-
const $
|
73
|
+
const $io30 = input => "string" === typeof input.authorizationUrl && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io29(input.scopes));
|
74
|
+
const $io31 = input => (undefined === input.tokenUrl || "string" === typeof input.tokenUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io29(input.scopes));
|
75
|
+
const $io32 = input => Object.keys(input).every(key => {
|
75
76
|
const value = input[key];
|
76
77
|
if (undefined === value)
|
77
78
|
return true;
|
78
|
-
return "object" === typeof value && null !== value && false === Array.isArray(value) && $
|
79
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io33(value);
|
79
80
|
});
|
80
|
-
const $
|
81
|
-
const $
|
82
|
-
const $
|
83
|
-
const $
|
84
|
-
const $
|
85
|
-
const $io37 = input => "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema);
|
81
|
+
const $io33 = input => (undefined === input.get || "object" === typeof input.get && null !== input.get && false === Array.isArray(input.get) && $io34(input.get)) && (undefined === input.post || "object" === typeof input.post && null !== input.post && false === Array.isArray(input.post) && $io34(input.post)) && (undefined === input.patch || "object" === typeof input.patch && null !== input.patch && false === Array.isArray(input.patch) && $io34(input.patch)) && (undefined === input.put || "object" === typeof input.put && null !== input.put && false === Array.isArray(input.put) && $io34(input.put)) && (undefined === input["delete"] || "object" === typeof input["delete"] && null !== input["delete"] && false === Array.isArray(input["delete"]) && $io34(input["delete"]));
|
82
|
+
const $io34 = input => (undefined === input.parameters || Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && $iu1(elem))) && (undefined === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && $io36(input.requestBody)) && (undefined === input.responses || "object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) && $io43(input.responses)) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input.security || Array.isArray(input.security) && input.security.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io45(elem))) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input["x-nestia-jsDocTags"] || Array.isArray(input["x-nestia-jsDocTags"]) && input["x-nestia-jsDocTags"].every(elem => "object" === typeof elem && null !== elem && $io46(elem)));
|
83
|
+
const $io35 = input => "string" === typeof input.$ref && RegExp(/^#\/components\/parameters\/(.*)/).test(input.$ref);
|
84
|
+
const $io36 = input => (undefined === input.description || "string" === typeof input.description) && ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && $io37(input.content)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input["x-nestia-encrypted"] || "boolean" === typeof input["x-nestia-encrypted"]);
|
85
|
+
const $io37 = input => (undefined === input["text/plain"] || "object" === typeof input["text/plain"] && null !== input["text/plain"] && $io38(input["text/plain"])) && (undefined === input["application/json"] || "object" === typeof input["application/json"] && null !== input["application/json"] && $io39(input["application/json"])) && (undefined === input["application/x-www-form-urlencoded"] || "object" === typeof input["application/x-www-form-urlencoded"] && null !== input["application/x-www-form-urlencoded"] && $io40(input["application/x-www-form-urlencoded"])) && (undefined === input["multipart/form-data"] || "object" === typeof input["multipart/form-data"] && null !== input["multipart/form-data"] && $io41(input["multipart/form-data"])) && (undefined === input["*/*"] || "object" === typeof input["*/*"] && null !== input["*/*"] && $io42(input["*/*"]));
|
86
86
|
const $io38 = input => "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema);
|
87
87
|
const $io39 = input => "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema);
|
88
88
|
const $io40 = input => "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema);
|
89
|
-
const $io41 = input =>
|
89
|
+
const $io41 = input => "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema);
|
90
|
+
const $io42 = input => "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema);
|
91
|
+
const $io43 = input => Object.keys(input).every(key => {
|
90
92
|
const value = input[key];
|
91
93
|
if (undefined === value)
|
92
94
|
return true;
|
93
|
-
return "object" === typeof value && null !== value && false === Array.isArray(value) && $
|
95
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io44(value);
|
94
96
|
});
|
95
|
-
const $
|
96
|
-
const $
|
97
|
+
const $io44 = input => (undefined === input.description || "string" === typeof input.description) && (undefined === input.content || "object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && $io37(input.content)) && (undefined === input["x-nestia-encrypted"] || "boolean" === typeof input["x-nestia-encrypted"]);
|
98
|
+
const $io45 = input => Object.keys(input).every(key => {
|
97
99
|
const value = input[key];
|
98
100
|
if (undefined === value)
|
99
101
|
return true;
|
100
102
|
return Array.isArray(value) && value.every(elem => "string" === typeof elem);
|
101
103
|
});
|
102
|
-
const $
|
103
|
-
const $
|
104
|
+
const $io46 = input => "string" === typeof input.name && (undefined === input.text || Array.isArray(input.text) && input.text.every(elem => "object" === typeof elem && null !== elem && $io47(elem)));
|
105
|
+
const $io47 = input => "string" === typeof input.text && "string" === typeof input.kind;
|
104
106
|
const $iu0 = input => (() => {
|
105
107
|
if ("null" === input.type)
|
106
|
-
return $io8(input);
|
107
|
-
else if (undefined !== input.anyOf)
|
108
108
|
return $io9(input);
|
109
|
-
else if (undefined !== input.
|
109
|
+
else if (undefined !== input.anyOf)
|
110
110
|
return $io10(input);
|
111
|
-
else if (
|
111
|
+
else if (undefined !== input.oneOf)
|
112
112
|
return $io11(input);
|
113
|
+
else if ("boolean" === input.type)
|
114
|
+
return $io12(input);
|
113
115
|
else if ("number" === input.type)
|
114
|
-
return $
|
116
|
+
return $io14(input);
|
115
117
|
else if ("integer" === input.type)
|
116
|
-
return $
|
118
|
+
return $io13(input);
|
117
119
|
else if ("string" === input.type)
|
118
|
-
return $io14(input);
|
119
|
-
else if ("array" === input.type)
|
120
120
|
return $io15(input);
|
121
|
-
else if ("
|
121
|
+
else if ("array" === input.type)
|
122
122
|
return $io16(input);
|
123
|
-
else if (
|
123
|
+
else if ("object" === input.type)
|
124
124
|
return $io17(input);
|
125
|
+
else if (undefined !== input.$ref)
|
126
|
+
return $io19(input);
|
125
127
|
else
|
126
|
-
return $
|
128
|
+
return $io8(input);
|
127
129
|
})();
|
128
130
|
const $iu1 = input => (() => {
|
131
|
+
if (undefined !== input["in"])
|
132
|
+
return $io7(input);
|
133
|
+
else if (undefined !== input.$ref)
|
134
|
+
return $io35(input);
|
135
|
+
else
|
136
|
+
return false;
|
137
|
+
})();
|
138
|
+
const $iu2 = input => (() => {
|
129
139
|
if ("basic" === input.scheme)
|
130
|
-
return $
|
140
|
+
return $io22(input);
|
131
141
|
else if ("bearer" === input.scheme)
|
132
|
-
return $
|
142
|
+
return $io23(input);
|
133
143
|
else if ("apiKey" === input.type)
|
134
|
-
return $
|
144
|
+
return $io24(input);
|
135
145
|
else if ("openIdConnect" === input.type)
|
136
|
-
return $
|
146
|
+
return $io25(input);
|
137
147
|
else if ("oauth2" === input.type)
|
138
|
-
return $
|
148
|
+
return $io26(input);
|
139
149
|
else
|
140
150
|
return false;
|
141
151
|
})();
|
@@ -185,7 +195,7 @@ class MigrateApplication {
|
|
185
195
|
path: _path + ".paths",
|
186
196
|
expected: "Record<string, ISwagger.IPath>",
|
187
197
|
value: input.paths
|
188
|
-
})) && $
|
198
|
+
})) && $vo32(input.paths, _path + ".paths", true && _exceptionable) || $report(_exceptionable, {
|
189
199
|
path: _path + ".paths",
|
190
200
|
expected: "Record<string, ISwagger.IPath>",
|
191
201
|
value: input.paths
|
@@ -197,7 +207,7 @@ class MigrateApplication {
|
|
197
207
|
path: _path + ".security[" + _index2 + "]",
|
198
208
|
expected: "Record<string, Array<string>>",
|
199
209
|
value: elem
|
200
|
-
})) && $
|
210
|
+
})) && $vo45(elem, _path + ".security[" + _index2 + "]", true && _exceptionable) || $report(_exceptionable, {
|
201
211
|
path: _path + ".security[" + _index2 + "]",
|
202
212
|
expected: "Record<string, Array<string>>",
|
203
213
|
value: elem
|
@@ -286,11 +296,19 @@ class MigrateApplication {
|
|
286
296
|
expected: "(string | undefined)",
|
287
297
|
value: input.description
|
288
298
|
})].every(flag => flag);
|
289
|
-
const $vo5 = (input, _path, _exceptionable = true) => [undefined === input.
|
299
|
+
const $vo5 = (input, _path, _exceptionable = true) => [undefined === input.parameters || ("object" === typeof input.parameters && null !== input.parameters && false === Array.isArray(input.parameters) || $report(_exceptionable, {
|
300
|
+
path: _path + ".parameters",
|
301
|
+
expected: "(Record<string, ISwaggerRouteParameter> | undefined)",
|
302
|
+
value: input.parameters
|
303
|
+
})) && $vo6(input.parameters, _path + ".parameters", true && _exceptionable) || $report(_exceptionable, {
|
304
|
+
path: _path + ".parameters",
|
305
|
+
expected: "(Record<string, ISwaggerRouteParameter> | undefined)",
|
306
|
+
value: input.parameters
|
307
|
+
}), undefined === input.schemas || ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || $report(_exceptionable, {
|
290
308
|
path: _path + ".schemas",
|
291
309
|
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
292
310
|
value: input.schemas
|
293
|
-
})) && $
|
311
|
+
})) && $vo18(input.schemas, _path + ".schemas", true && _exceptionable) || $report(_exceptionable, {
|
294
312
|
path: _path + ".schemas",
|
295
313
|
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
296
314
|
value: input.schemas
|
@@ -298,7 +316,7 @@ class MigrateApplication {
|
|
298
316
|
path: _path + ".securitySchemes",
|
299
317
|
expected: "(Record<string, ISwaggerSecurityScheme> | undefined)",
|
300
318
|
value: input.securitySchemes
|
301
|
-
})) && $
|
319
|
+
})) && $vo21(input.securitySchemes, _path + ".securitySchemes", true && _exceptionable) || $report(_exceptionable, {
|
302
320
|
path: _path + ".securitySchemes",
|
303
321
|
expected: "(Record<string, ISwaggerSecurityScheme> | undefined)",
|
304
322
|
value: input.securitySchemes
|
@@ -311,17 +329,42 @@ class MigrateApplication {
|
|
311
329
|
const value = input[key];
|
312
330
|
if (undefined === value)
|
313
331
|
return true;
|
314
|
-
return ("object" === typeof value && null !== value
|
332
|
+
return ("object" === typeof value && null !== value || $report(_exceptionable, {
|
315
333
|
path: _path + $join(key),
|
316
|
-
expected: "
|
334
|
+
expected: "ISwaggerRouteParameter",
|
317
335
|
value: value
|
318
|
-
})) && $
|
336
|
+
})) && $vo7(value, _path + $join(key), true && _exceptionable) || $report(_exceptionable, {
|
319
337
|
path: _path + $join(key),
|
320
|
-
expected: "
|
338
|
+
expected: "ISwaggerRouteParameter",
|
321
339
|
value: value
|
322
340
|
});
|
323
341
|
}).every(flag => flag)].every(flag => flag);
|
324
|
-
const $vo7 = (input, _path, _exceptionable = true) => [
|
342
|
+
const $vo7 = (input, _path, _exceptionable = true) => [undefined === input.name || "string" === typeof input.name || $report(_exceptionable, {
|
343
|
+
path: _path + ".name",
|
344
|
+
expected: "(string | undefined)",
|
345
|
+
value: input.name
|
346
|
+
}), "cookie" === input["in"] || "header" === input["in"] || "path" === input["in"] || "query" === input["in"] || $report(_exceptionable, {
|
347
|
+
path: _path + "[\"in\"]",
|
348
|
+
expected: "(\"cookie\" | \"header\" | \"path\" | \"query\")",
|
349
|
+
value: input["in"]
|
350
|
+
}), ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $report(_exceptionable, {
|
351
|
+
path: _path + ".schema",
|
352
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
353
|
+
value: input.schema
|
354
|
+
})) && $vu0(input.schema, _path + ".schema", true && _exceptionable) || $report(_exceptionable, {
|
355
|
+
path: _path + ".schema",
|
356
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
357
|
+
value: input.schema
|
358
|
+
}), undefined === input.required || "boolean" === typeof input.required || $report(_exceptionable, {
|
359
|
+
path: _path + ".required",
|
360
|
+
expected: "(boolean | undefined)",
|
361
|
+
value: input.required
|
362
|
+
}), undefined === input.description || "string" === typeof input.description || $report(_exceptionable, {
|
363
|
+
path: _path + ".description",
|
364
|
+
expected: "(string | undefined)",
|
365
|
+
value: input.description
|
366
|
+
})].every(flag => flag);
|
367
|
+
const $vo8 = (input, _path, _exceptionable = true) => [(null !== input.type || $report(_exceptionable, {
|
325
368
|
path: _path + ".type",
|
326
369
|
expected: "undefined",
|
327
370
|
value: input.type
|
@@ -350,7 +393,7 @@ class MigrateApplication {
|
|
350
393
|
expected: "(boolean | undefined)",
|
351
394
|
value: input["x-typia-rest"]
|
352
395
|
})].every(flag => flag);
|
353
|
-
const $
|
396
|
+
const $vo9 = (input, _path, _exceptionable = true) => ["null" === input.type || $report(_exceptionable, {
|
354
397
|
path: _path + ".type",
|
355
398
|
expected: "\"null\"",
|
356
399
|
value: input.type
|
@@ -375,7 +418,7 @@ class MigrateApplication {
|
|
375
418
|
expected: "(boolean | undefined)",
|
376
419
|
value: input["x-typia-rest"]
|
377
420
|
})].every(flag => flag);
|
378
|
-
const $
|
421
|
+
const $vo10 = (input, _path, _exceptionable = true) => [(Array.isArray(input.anyOf) || $report(_exceptionable, {
|
379
422
|
path: _path + ".anyOf",
|
380
423
|
expected: "Array<ISwaggerSchema>",
|
381
424
|
value: input.anyOf
|
@@ -412,7 +455,7 @@ class MigrateApplication {
|
|
412
455
|
expected: "(boolean | undefined)",
|
413
456
|
value: input["x-typia-rest"]
|
414
457
|
})].every(flag => flag);
|
415
|
-
const $
|
458
|
+
const $vo11 = (input, _path, _exceptionable = true) => [(Array.isArray(input.oneOf) || $report(_exceptionable, {
|
416
459
|
path: _path + ".oneOf",
|
417
460
|
expected: "Array<ISwaggerSchema>",
|
418
461
|
value: input.oneOf
|
@@ -449,7 +492,7 @@ class MigrateApplication {
|
|
449
492
|
expected: "(boolean | undefined)",
|
450
493
|
value: input["x-typia-rest"]
|
451
494
|
})].every(flag => flag);
|
452
|
-
const $
|
495
|
+
const $vo12 = (input, _path, _exceptionable = true) => [undefined === input["default"] || "boolean" === typeof input["default"] || $report(_exceptionable, {
|
453
496
|
path: _path + "[\"default\"]",
|
454
497
|
expected: "(boolean | undefined)",
|
455
498
|
value: input["default"]
|
@@ -494,7 +537,7 @@ class MigrateApplication {
|
|
494
537
|
expected: "(boolean | undefined)",
|
495
538
|
value: input["x-typia-rest"]
|
496
539
|
})].every(flag => flag);
|
497
|
-
const $
|
540
|
+
const $vo13 = (input, _path, _exceptionable = true) => [undefined === input["default"] || "number" === typeof input["default"] && (Math.floor(input["default"]) === input["default"] && -2147483648 <= input["default"] && input["default"] <= 2147483647 || $report(_exceptionable, {
|
498
541
|
path: _path + "[\"default\"]",
|
499
542
|
expected: "number & Type<\"int32\">",
|
500
543
|
value: input["default"]
|
@@ -575,7 +618,7 @@ class MigrateApplication {
|
|
575
618
|
expected: "(boolean | undefined)",
|
576
619
|
value: input["x-typia-rest"]
|
577
620
|
})].every(flag => flag);
|
578
|
-
const $
|
621
|
+
const $vo14 = (input, _path, _exceptionable = true) => [undefined === input["default"] || "number" === typeof input["default"] || $report(_exceptionable, {
|
579
622
|
path: _path + "[\"default\"]",
|
580
623
|
expected: "(number | undefined)",
|
581
624
|
value: input["default"]
|
@@ -640,7 +683,7 @@ class MigrateApplication {
|
|
640
683
|
expected: "(boolean | undefined)",
|
641
684
|
value: input["x-typia-rest"]
|
642
685
|
})].every(flag => flag);
|
643
|
-
const $
|
686
|
+
const $vo15 = (input, _path, _exceptionable = true) => [undefined === input["default"] || "string" === typeof input["default"] || $report(_exceptionable, {
|
644
687
|
path: _path + "[\"default\"]",
|
645
688
|
expected: "(string | undefined)",
|
646
689
|
value: input["default"]
|
@@ -709,7 +752,7 @@ class MigrateApplication {
|
|
709
752
|
expected: "(boolean | undefined)",
|
710
753
|
value: input["x-typia-rest"]
|
711
754
|
})].every(flag => flag);
|
712
|
-
const $
|
755
|
+
const $vo16 = (input, _path, _exceptionable = true) => [("object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) || $report(_exceptionable, {
|
713
756
|
path: _path + ".items",
|
714
757
|
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
715
758
|
value: input.items
|
@@ -737,7 +780,7 @@ class MigrateApplication {
|
|
737
780
|
path: _path + "[\"x-typia-tuple\"]",
|
738
781
|
expected: "(ISwaggerSchema.ITuple | undefined)",
|
739
782
|
value: input["x-typia-tuple"]
|
740
|
-
})) && $
|
783
|
+
})) && $vo20(input["x-typia-tuple"], _path + "[\"x-typia-tuple\"]", true && _exceptionable) || $report(_exceptionable, {
|
741
784
|
path: _path + "[\"x-typia-tuple\"]",
|
742
785
|
expected: "(ISwaggerSchema.ITuple | undefined)",
|
743
786
|
value: input["x-typia-tuple"]
|
@@ -770,11 +813,11 @@ class MigrateApplication {
|
|
770
813
|
expected: "(boolean | undefined)",
|
771
814
|
value: input["x-typia-rest"]
|
772
815
|
})].every(flag => flag);
|
773
|
-
const $
|
816
|
+
const $vo17 = (input, _path, _exceptionable = true) => [undefined === input.properties || ("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) || $report(_exceptionable, {
|
774
817
|
path: _path + ".properties",
|
775
818
|
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
776
819
|
value: input.properties
|
777
|
-
})) && $
|
820
|
+
})) && $vo18(input.properties, _path + ".properties", true && _exceptionable) || $report(_exceptionable, {
|
778
821
|
path: _path + ".properties",
|
779
822
|
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
780
823
|
value: input.properties
|
@@ -806,7 +849,7 @@ class MigrateApplication {
|
|
806
849
|
path: _path + "[\"x-typia-patternProperties\"]",
|
807
850
|
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
808
851
|
value: input["x-typia-patternProperties"]
|
809
|
-
})) && $
|
852
|
+
})) && $vo18(input["x-typia-patternProperties"], _path + "[\"x-typia-patternProperties\"]", true && _exceptionable) || $report(_exceptionable, {
|
810
853
|
path: _path + "[\"x-typia-patternProperties\"]",
|
811
854
|
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
812
855
|
value: input["x-typia-patternProperties"]
|
@@ -839,7 +882,21 @@ class MigrateApplication {
|
|
839
882
|
expected: "(boolean | undefined)",
|
840
883
|
value: input["x-typia-rest"]
|
841
884
|
})].every(flag => flag);
|
842
|
-
const $
|
885
|
+
const $vo18 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
886
|
+
const value = input[key];
|
887
|
+
if (undefined === value)
|
888
|
+
return true;
|
889
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $report(_exceptionable, {
|
890
|
+
path: _path + $join(key),
|
891
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
892
|
+
value: value
|
893
|
+
})) && $vu0(value, _path + $join(key), true && _exceptionable) || $report(_exceptionable, {
|
894
|
+
path: _path + $join(key),
|
895
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
896
|
+
value: value
|
897
|
+
});
|
898
|
+
}).every(flag => flag)].every(flag => flag);
|
899
|
+
const $vo19 = (input, _path, _exceptionable = true) => ["string" === typeof input.$ref || $report(_exceptionable, {
|
843
900
|
path: _path + ".$ref",
|
844
901
|
expected: "string",
|
845
902
|
value: input.$ref
|
@@ -864,7 +921,7 @@ class MigrateApplication {
|
|
864
921
|
expected: "(boolean | undefined)",
|
865
922
|
value: input["x-typia-rest"]
|
866
923
|
})].every(flag => flag);
|
867
|
-
const $
|
924
|
+
const $vo20 = (input, _path, _exceptionable = true) => [(Array.isArray(input.items) || $report(_exceptionable, {
|
868
925
|
path: _path + ".items",
|
869
926
|
expected: "Array<ISwaggerSchema>",
|
870
927
|
value: input.items
|
@@ -909,7 +966,7 @@ class MigrateApplication {
|
|
909
966
|
expected: "(boolean | undefined)",
|
910
967
|
value: input["x-typia-rest"]
|
911
968
|
})].every(flag => flag);
|
912
|
-
const $
|
969
|
+
const $vo21 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
913
970
|
const value = input[key];
|
914
971
|
if (undefined === value)
|
915
972
|
return true;
|
@@ -917,13 +974,13 @@ class MigrateApplication {
|
|
917
974
|
path: _path + $join(key),
|
918
975
|
expected: "(ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IOAuth2 | ISwaggerSecurityScheme.IOpenId)",
|
919
976
|
value: value
|
920
|
-
})) && $
|
977
|
+
})) && $vu2(value, _path + $join(key), true && _exceptionable) || $report(_exceptionable, {
|
921
978
|
path: _path + $join(key),
|
922
979
|
expected: "(ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IOAuth2 | ISwaggerSecurityScheme.IOpenId)",
|
923
980
|
value: value
|
924
981
|
});
|
925
982
|
}).every(flag => flag)].every(flag => flag);
|
926
|
-
const $
|
983
|
+
const $vo22 = (input, _path, _exceptionable = true) => ["http" === input.type || $report(_exceptionable, {
|
927
984
|
path: _path + ".type",
|
928
985
|
expected: "\"http\"",
|
929
986
|
value: input.type
|
@@ -932,7 +989,7 @@ class MigrateApplication {
|
|
932
989
|
expected: "\"basic\"",
|
933
990
|
value: input.scheme
|
934
991
|
})].every(flag => flag);
|
935
|
-
const $
|
992
|
+
const $vo23 = (input, _path, _exceptionable = true) => ["http" === input.type || $report(_exceptionable, {
|
936
993
|
path: _path + ".type",
|
937
994
|
expected: "\"http\"",
|
938
995
|
value: input.type
|
@@ -945,11 +1002,11 @@ class MigrateApplication {
|
|
945
1002
|
expected: "(string | undefined)",
|
946
1003
|
value: input.bearerFormat
|
947
1004
|
})].every(flag => flag);
|
948
|
-
const $
|
1005
|
+
const $vo24 = (input, _path, _exceptionable = true) => ["apiKey" === input.type || $report(_exceptionable, {
|
949
1006
|
path: _path + ".type",
|
950
1007
|
expected: "\"apiKey\"",
|
951
1008
|
value: input.type
|
952
|
-
}), undefined === input["in"] || "
|
1009
|
+
}), undefined === input["in"] || "cookie" === input["in"] || "header" === input["in"] || "query" === input["in"] || $report(_exceptionable, {
|
953
1010
|
path: _path + "[\"in\"]",
|
954
1011
|
expected: "(\"cookie\" | \"header\" | \"query\" | undefined)",
|
955
1012
|
value: input["in"]
|
@@ -958,7 +1015,7 @@ class MigrateApplication {
|
|
958
1015
|
expected: "(string | undefined)",
|
959
1016
|
value: input.name
|
960
1017
|
})].every(flag => flag);
|
961
|
-
const $
|
1018
|
+
const $vo25 = (input, _path, _exceptionable = true) => ["openIdConnect" === input.type || $report(_exceptionable, {
|
962
1019
|
path: _path + ".type",
|
963
1020
|
expected: "\"openIdConnect\"",
|
964
1021
|
value: input.type
|
@@ -967,7 +1024,7 @@ class MigrateApplication {
|
|
967
1024
|
expected: "string",
|
968
1025
|
value: input.openIdConnectUrl
|
969
1026
|
})].every(flag => flag);
|
970
|
-
const $
|
1027
|
+
const $vo26 = (input, _path, _exceptionable = true) => ["oauth2" === input.type || $report(_exceptionable, {
|
971
1028
|
path: _path + ".type",
|
972
1029
|
expected: "\"oauth2\"",
|
973
1030
|
value: input.type
|
@@ -975,7 +1032,7 @@ class MigrateApplication {
|
|
975
1032
|
path: _path + ".flows",
|
976
1033
|
expected: "ISwaggerSecurityScheme.IOAuth2.IFlowSet",
|
977
1034
|
value: input.flows
|
978
|
-
})) && $
|
1035
|
+
})) && $vo27(input.flows, _path + ".flows", true && _exceptionable) || $report(_exceptionable, {
|
979
1036
|
path: _path + ".flows",
|
980
1037
|
expected: "ISwaggerSecurityScheme.IOAuth2.IFlowSet",
|
981
1038
|
value: input.flows
|
@@ -984,11 +1041,11 @@ class MigrateApplication {
|
|
984
1041
|
expected: "(string | undefined)",
|
985
1042
|
value: input.description
|
986
1043
|
})].every(flag => flag);
|
987
|
-
const $
|
1044
|
+
const $vo27 = (input, _path, _exceptionable = true) => [undefined === input.authorizationCode || ("object" === typeof input.authorizationCode && null !== input.authorizationCode || $report(_exceptionable, {
|
988
1045
|
path: _path + ".authorizationCode",
|
989
1046
|
expected: "(ISwaggerSecurityScheme.IOAuth2.IFlow | undefined)",
|
990
1047
|
value: input.authorizationCode
|
991
|
-
})) && $
|
1048
|
+
})) && $vo28(input.authorizationCode, _path + ".authorizationCode", true && _exceptionable) || $report(_exceptionable, {
|
992
1049
|
path: _path + ".authorizationCode",
|
993
1050
|
expected: "(ISwaggerSecurityScheme.IOAuth2.IFlow | undefined)",
|
994
1051
|
value: input.authorizationCode
|
@@ -996,7 +1053,7 @@ class MigrateApplication {
|
|
996
1053
|
path: _path + ".implicit",
|
997
1054
|
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
998
1055
|
value: input.implicit
|
999
|
-
})) && $
|
1056
|
+
})) && $vo30(input.implicit, _path + ".implicit", true && _exceptionable) || $report(_exceptionable, {
|
1000
1057
|
path: _path + ".implicit",
|
1001
1058
|
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
1002
1059
|
value: input.implicit
|
@@ -1004,7 +1061,7 @@ class MigrateApplication {
|
|
1004
1061
|
path: _path + ".password",
|
1005
1062
|
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1006
1063
|
value: input.password
|
1007
|
-
})) && $
|
1064
|
+
})) && $vo31(input.password, _path + ".password", true && _exceptionable) || $report(_exceptionable, {
|
1008
1065
|
path: _path + ".password",
|
1009
1066
|
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1010
1067
|
value: input.password
|
@@ -1012,12 +1069,12 @@ class MigrateApplication {
|
|
1012
1069
|
path: _path + ".clientCredentials",
|
1013
1070
|
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1014
1071
|
value: input.clientCredentials
|
1015
|
-
})) && $
|
1072
|
+
})) && $vo31(input.clientCredentials, _path + ".clientCredentials", true && _exceptionable) || $report(_exceptionable, {
|
1016
1073
|
path: _path + ".clientCredentials",
|
1017
1074
|
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1018
1075
|
value: input.clientCredentials
|
1019
1076
|
})].every(flag => flag);
|
1020
|
-
const $
|
1077
|
+
const $vo28 = (input, _path, _exceptionable = true) => ["string" === typeof input.authorizationUrl || $report(_exceptionable, {
|
1021
1078
|
path: _path + ".authorizationUrl",
|
1022
1079
|
expected: "string",
|
1023
1080
|
value: input.authorizationUrl
|
@@ -1033,12 +1090,12 @@ class MigrateApplication {
|
|
1033
1090
|
path: _path + ".scopes",
|
1034
1091
|
expected: "(Record<string, string> | undefined)",
|
1035
1092
|
value: input.scopes
|
1036
|
-
})) && $
|
1093
|
+
})) && $vo29(input.scopes, _path + ".scopes", true && _exceptionable) || $report(_exceptionable, {
|
1037
1094
|
path: _path + ".scopes",
|
1038
1095
|
expected: "(Record<string, string> | undefined)",
|
1039
1096
|
value: input.scopes
|
1040
1097
|
})].every(flag => flag);
|
1041
|
-
const $
|
1098
|
+
const $vo29 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
1042
1099
|
const value = input[key];
|
1043
1100
|
if (undefined === value)
|
1044
1101
|
return true;
|
@@ -1048,7 +1105,7 @@ class MigrateApplication {
|
|
1048
1105
|
value: value
|
1049
1106
|
});
|
1050
1107
|
}).every(flag => flag)].every(flag => flag);
|
1051
|
-
const $
|
1108
|
+
const $vo30 = (input, _path, _exceptionable = true) => ["string" === typeof input.authorizationUrl || $report(_exceptionable, {
|
1052
1109
|
path: _path + ".authorizationUrl",
|
1053
1110
|
expected: "string",
|
1054
1111
|
value: input.authorizationUrl
|
@@ -1060,12 +1117,12 @@ class MigrateApplication {
|
|
1060
1117
|
path: _path + ".scopes",
|
1061
1118
|
expected: "(Record<string, string> | undefined)",
|
1062
1119
|
value: input.scopes
|
1063
|
-
})) && $
|
1120
|
+
})) && $vo29(input.scopes, _path + ".scopes", true && _exceptionable) || $report(_exceptionable, {
|
1064
1121
|
path: _path + ".scopes",
|
1065
1122
|
expected: "(Record<string, string> | undefined)",
|
1066
1123
|
value: input.scopes
|
1067
1124
|
})].every(flag => flag);
|
1068
|
-
const $
|
1125
|
+
const $vo31 = (input, _path, _exceptionable = true) => [undefined === input.tokenUrl || "string" === typeof input.tokenUrl || $report(_exceptionable, {
|
1069
1126
|
path: _path + ".tokenUrl",
|
1070
1127
|
expected: "(string | undefined)",
|
1071
1128
|
value: input.tokenUrl
|
@@ -1077,12 +1134,12 @@ class MigrateApplication {
|
|
1077
1134
|
path: _path + ".scopes",
|
1078
1135
|
expected: "(Record<string, string> | undefined)",
|
1079
1136
|
value: input.scopes
|
1080
|
-
})) && $
|
1137
|
+
})) && $vo29(input.scopes, _path + ".scopes", true && _exceptionable) || $report(_exceptionable, {
|
1081
1138
|
path: _path + ".scopes",
|
1082
1139
|
expected: "(Record<string, string> | undefined)",
|
1083
1140
|
value: input.scopes
|
1084
1141
|
})].every(flag => flag);
|
1085
|
-
const $
|
1142
|
+
const $vo32 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
1086
1143
|
const value = input[key];
|
1087
1144
|
if (undefined === value)
|
1088
1145
|
return true;
|
@@ -1090,47 +1147,74 @@ class MigrateApplication {
|
|
1090
1147
|
path: _path + $join(key),
|
1091
1148
|
expected: "ISwagger.IPath",
|
1092
1149
|
value: value
|
1093
|
-
})) && $
|
1150
|
+
})) && $vo33(value, _path + $join(key), true && _exceptionable) || $report(_exceptionable, {
|
1094
1151
|
path: _path + $join(key),
|
1095
1152
|
expected: "ISwagger.IPath",
|
1096
1153
|
value: value
|
1097
1154
|
});
|
1098
1155
|
}).every(flag => flag)].every(flag => flag);
|
1099
|
-
const $
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1156
|
+
const $vo33 = (input, _path, _exceptionable = true) => [undefined === input.get || ("object" === typeof input.get && null !== input.get && false === Array.isArray(input.get) || $report(_exceptionable, {
|
1157
|
+
path: _path + ".get",
|
1158
|
+
expected: "(ISwaggerRoute | undefined)",
|
1159
|
+
value: input.get
|
1160
|
+
})) && $vo34(input.get, _path + ".get", true && _exceptionable) || $report(_exceptionable, {
|
1161
|
+
path: _path + ".get",
|
1162
|
+
expected: "(ISwaggerRoute | undefined)",
|
1163
|
+
value: input.get
|
1164
|
+
}), undefined === input.post || ("object" === typeof input.post && null !== input.post && false === Array.isArray(input.post) || $report(_exceptionable, {
|
1165
|
+
path: _path + ".post",
|
1166
|
+
expected: "(ISwaggerRoute | undefined)",
|
1167
|
+
value: input.post
|
1168
|
+
})) && $vo34(input.post, _path + ".post", true && _exceptionable) || $report(_exceptionable, {
|
1169
|
+
path: _path + ".post",
|
1170
|
+
expected: "(ISwaggerRoute | undefined)",
|
1171
|
+
value: input.post
|
1172
|
+
}), undefined === input.patch || ("object" === typeof input.patch && null !== input.patch && false === Array.isArray(input.patch) || $report(_exceptionable, {
|
1173
|
+
path: _path + ".patch",
|
1174
|
+
expected: "(ISwaggerRoute | undefined)",
|
1175
|
+
value: input.patch
|
1176
|
+
})) && $vo34(input.patch, _path + ".patch", true && _exceptionable) || $report(_exceptionable, {
|
1177
|
+
path: _path + ".patch",
|
1178
|
+
expected: "(ISwaggerRoute | undefined)",
|
1179
|
+
value: input.patch
|
1180
|
+
}), undefined === input.put || ("object" === typeof input.put && null !== input.put && false === Array.isArray(input.put) || $report(_exceptionable, {
|
1181
|
+
path: _path + ".put",
|
1182
|
+
expected: "(ISwaggerRoute | undefined)",
|
1183
|
+
value: input.put
|
1184
|
+
})) && $vo34(input.put, _path + ".put", true && _exceptionable) || $report(_exceptionable, {
|
1185
|
+
path: _path + ".put",
|
1186
|
+
expected: "(ISwaggerRoute | undefined)",
|
1187
|
+
value: input.put
|
1188
|
+
}), undefined === input["delete"] || ("object" === typeof input["delete"] && null !== input["delete"] && false === Array.isArray(input["delete"]) || $report(_exceptionable, {
|
1189
|
+
path: _path + "[\"delete\"]",
|
1190
|
+
expected: "(ISwaggerRoute | undefined)",
|
1191
|
+
value: input["delete"]
|
1192
|
+
})) && $vo34(input["delete"], _path + "[\"delete\"]", true && _exceptionable) || $report(_exceptionable, {
|
1193
|
+
path: _path + "[\"delete\"]",
|
1194
|
+
expected: "(ISwaggerRoute | undefined)",
|
1195
|
+
value: input["delete"]
|
1196
|
+
})].every(flag => flag);
|
1197
|
+
const $vo34 = (input, _path, _exceptionable = true) => [undefined === input.parameters || (Array.isArray(input.parameters) || $report(_exceptionable, {
|
1114
1198
|
path: _path + ".parameters",
|
1115
|
-
expected: "(Array<
|
1199
|
+
expected: "(Array<ISwaggerRouteParameter | IReference> | undefined)",
|
1116
1200
|
value: input.parameters
|
1117
1201
|
})) && input.parameters.map((elem, _index11) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
1118
1202
|
path: _path + ".parameters[" + _index11 + "]",
|
1119
|
-
expected: "
|
1203
|
+
expected: "(ISwaggerRouteParameter | ISwaggerRouteParameter.IReference)",
|
1120
1204
|
value: elem
|
1121
|
-
})) && $
|
1205
|
+
})) && $vu1(elem, _path + ".parameters[" + _index11 + "]", true && _exceptionable) || $report(_exceptionable, {
|
1122
1206
|
path: _path + ".parameters[" + _index11 + "]",
|
1123
|
-
expected: "
|
1207
|
+
expected: "(ISwaggerRouteParameter | ISwaggerRouteParameter.IReference)",
|
1124
1208
|
value: elem
|
1125
1209
|
})).every(flag => flag) || $report(_exceptionable, {
|
1126
1210
|
path: _path + ".parameters",
|
1127
|
-
expected: "(Array<
|
1211
|
+
expected: "(Array<ISwaggerRouteParameter | IReference> | undefined)",
|
1128
1212
|
value: input.parameters
|
1129
1213
|
}), undefined === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody || $report(_exceptionable, {
|
1130
1214
|
path: _path + ".requestBody",
|
1131
1215
|
expected: "(ISwaggerRoute.IRequestBody | undefined)",
|
1132
1216
|
value: input.requestBody
|
1133
|
-
})) && $
|
1217
|
+
})) && $vo36(input.requestBody, _path + ".requestBody", true && _exceptionable) || $report(_exceptionable, {
|
1134
1218
|
path: _path + ".requestBody",
|
1135
1219
|
expected: "(ISwaggerRoute.IRequestBody | undefined)",
|
1136
1220
|
value: input.requestBody
|
@@ -1138,7 +1222,7 @@ class MigrateApplication {
|
|
1138
1222
|
path: _path + ".responses",
|
1139
1223
|
expected: "(ISwaggerRoute.IResponseBody | undefined)",
|
1140
1224
|
value: input.responses
|
1141
|
-
})) && $
|
1225
|
+
})) && $vo43(input.responses, _path + ".responses", true && _exceptionable) || $report(_exceptionable, {
|
1142
1226
|
path: _path + ".responses",
|
1143
1227
|
expected: "(ISwaggerRoute.IResponseBody | undefined)",
|
1144
1228
|
value: input.responses
|
@@ -1162,7 +1246,7 @@ class MigrateApplication {
|
|
1162
1246
|
path: _path + ".security[" + _index12 + "]",
|
1163
1247
|
expected: "Record<string, Array<string>>",
|
1164
1248
|
value: elem
|
1165
|
-
})) && $
|
1249
|
+
})) && $vo45(elem, _path + ".security[" + _index12 + "]", true && _exceptionable) || $report(_exceptionable, {
|
1166
1250
|
path: _path + ".security[" + _index12 + "]",
|
1167
1251
|
expected: "Record<string, Array<string>>",
|
1168
1252
|
value: elem
|
@@ -1190,7 +1274,7 @@ class MigrateApplication {
|
|
1190
1274
|
path: _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]",
|
1191
1275
|
expected: "IJsDocTagInfo",
|
1192
1276
|
value: elem
|
1193
|
-
})) && $
|
1277
|
+
})) && $vo46(elem, _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]", true && _exceptionable) || $report(_exceptionable, {
|
1194
1278
|
path: _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]",
|
1195
1279
|
expected: "IJsDocTagInfo",
|
1196
1280
|
value: elem
|
@@ -1199,32 +1283,12 @@ class MigrateApplication {
|
|
1199
1283
|
expected: "(Array<IJsDocTagInfo> | undefined)",
|
1200
1284
|
value: input["x-nestia-jsDocTags"]
|
1201
1285
|
})].every(flag => flag);
|
1202
|
-
const $
|
1203
|
-
path: _path + "
|
1204
|
-
expected: "
|
1205
|
-
value: input
|
1206
|
-
}), "header" === input["in"] || "query" === input["in"] || "cookie" === input["in"] || "path" === input["in"] || $report(_exceptionable, {
|
1207
|
-
path: _path + "[\"in\"]",
|
1208
|
-
expected: "(\"cookie\" | \"header\" | \"path\" | \"query\")",
|
1209
|
-
value: input["in"]
|
1210
|
-
}), ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $report(_exceptionable, {
|
1211
|
-
path: _path + ".schema",
|
1212
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1213
|
-
value: input.schema
|
1214
|
-
})) && $vu0(input.schema, _path + ".schema", true && _exceptionable) || $report(_exceptionable, {
|
1215
|
-
path: _path + ".schema",
|
1216
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1217
|
-
value: input.schema
|
1218
|
-
}), undefined === input.required || "boolean" === typeof input.required || $report(_exceptionable, {
|
1219
|
-
path: _path + ".required",
|
1220
|
-
expected: "(boolean | undefined)",
|
1221
|
-
value: input.required
|
1222
|
-
}), undefined === input.description || "string" === typeof input.description || $report(_exceptionable, {
|
1223
|
-
path: _path + ".description",
|
1224
|
-
expected: "(string | undefined)",
|
1225
|
-
value: input.description
|
1286
|
+
const $vo35 = (input, _path, _exceptionable = true) => ["string" === typeof input.$ref && RegExp(/^#\/components\/parameters\/(.*)/).test(input.$ref) || $report(_exceptionable, {
|
1287
|
+
path: _path + ".$ref",
|
1288
|
+
expected: "`#/components/parameters/${string}`",
|
1289
|
+
value: input.$ref
|
1226
1290
|
})].every(flag => flag);
|
1227
|
-
const $
|
1291
|
+
const $vo36 = (input, _path, _exceptionable = true) => [undefined === input.description || "string" === typeof input.description || $report(_exceptionable, {
|
1228
1292
|
path: _path + ".description",
|
1229
1293
|
expected: "(string | undefined)",
|
1230
1294
|
value: input.description
|
@@ -1232,7 +1296,7 @@ class MigrateApplication {
|
|
1232
1296
|
path: _path + ".content",
|
1233
1297
|
expected: "ISwaggerRoute.IContent",
|
1234
1298
|
value: input.content
|
1235
|
-
})) && $
|
1299
|
+
})) && $vo37(input.content, _path + ".content", true && _exceptionable) || $report(_exceptionable, {
|
1236
1300
|
path: _path + ".content",
|
1237
1301
|
expected: "ISwaggerRoute.IContent",
|
1238
1302
|
value: input.content
|
@@ -1245,11 +1309,11 @@ class MigrateApplication {
|
|
1245
1309
|
expected: "(boolean | undefined)",
|
1246
1310
|
value: input["x-nestia-encrypted"]
|
1247
1311
|
})].every(flag => flag);
|
1248
|
-
const $
|
1312
|
+
const $vo37 = (input, _path, _exceptionable = true) => [undefined === input["text/plain"] || ("object" === typeof input["text/plain"] && null !== input["text/plain"] || $report(_exceptionable, {
|
1249
1313
|
path: _path + "[\"text/plain\"]",
|
1250
1314
|
expected: "(__type | undefined)",
|
1251
1315
|
value: input["text/plain"]
|
1252
|
-
})) && $
|
1316
|
+
})) && $vo38(input["text/plain"], _path + "[\"text/plain\"]", true && _exceptionable) || $report(_exceptionable, {
|
1253
1317
|
path: _path + "[\"text/plain\"]",
|
1254
1318
|
expected: "(__type | undefined)",
|
1255
1319
|
value: input["text/plain"]
|
@@ -1257,7 +1321,7 @@ class MigrateApplication {
|
|
1257
1321
|
path: _path + "[\"application/json\"]",
|
1258
1322
|
expected: "(__type.o1 | undefined)",
|
1259
1323
|
value: input["application/json"]
|
1260
|
-
})) && $
|
1324
|
+
})) && $vo39(input["application/json"], _path + "[\"application/json\"]", true && _exceptionable) || $report(_exceptionable, {
|
1261
1325
|
path: _path + "[\"application/json\"]",
|
1262
1326
|
expected: "(__type.o1 | undefined)",
|
1263
1327
|
value: input["application/json"]
|
@@ -1265,7 +1329,7 @@ class MigrateApplication {
|
|
1265
1329
|
path: _path + "[\"application/x-www-form-urlencoded\"]",
|
1266
1330
|
expected: "(__type.o2 | undefined)",
|
1267
1331
|
value: input["application/x-www-form-urlencoded"]
|
1268
|
-
})) && $
|
1332
|
+
})) && $vo40(input["application/x-www-form-urlencoded"], _path + "[\"application/x-www-form-urlencoded\"]", true && _exceptionable) || $report(_exceptionable, {
|
1269
1333
|
path: _path + "[\"application/x-www-form-urlencoded\"]",
|
1270
1334
|
expected: "(__type.o2 | undefined)",
|
1271
1335
|
value: input["application/x-www-form-urlencoded"]
|
@@ -1273,7 +1337,7 @@ class MigrateApplication {
|
|
1273
1337
|
path: _path + "[\"multipart/form-data\"]",
|
1274
1338
|
expected: "(__type.o3 | undefined)",
|
1275
1339
|
value: input["multipart/form-data"]
|
1276
|
-
})) && $
|
1340
|
+
})) && $vo41(input["multipart/form-data"], _path + "[\"multipart/form-data\"]", true && _exceptionable) || $report(_exceptionable, {
|
1277
1341
|
path: _path + "[\"multipart/form-data\"]",
|
1278
1342
|
expected: "(__type.o3 | undefined)",
|
1279
1343
|
value: input["multipart/form-data"]
|
@@ -1281,12 +1345,12 @@ class MigrateApplication {
|
|
1281
1345
|
path: _path + "[\"*/*\"]",
|
1282
1346
|
expected: "(__type.o4 | undefined)",
|
1283
1347
|
value: input["*/*"]
|
1284
|
-
})) && $
|
1348
|
+
})) && $vo42(input["*/*"], _path + "[\"*/*\"]", true && _exceptionable) || $report(_exceptionable, {
|
1285
1349
|
path: _path + "[\"*/*\"]",
|
1286
1350
|
expected: "(__type.o4 | undefined)",
|
1287
1351
|
value: input["*/*"]
|
1288
1352
|
})].every(flag => flag);
|
1289
|
-
const $
|
1353
|
+
const $vo38 = (input, _path, _exceptionable = true) => [("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $report(_exceptionable, {
|
1290
1354
|
path: _path + ".schema",
|
1291
1355
|
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1292
1356
|
value: input.schema
|
@@ -1295,7 +1359,7 @@ class MigrateApplication {
|
|
1295
1359
|
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1296
1360
|
value: input.schema
|
1297
1361
|
})].every(flag => flag);
|
1298
|
-
const $
|
1362
|
+
const $vo39 = (input, _path, _exceptionable = true) => [("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $report(_exceptionable, {
|
1299
1363
|
path: _path + ".schema",
|
1300
1364
|
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1301
1365
|
value: input.schema
|
@@ -1304,7 +1368,7 @@ class MigrateApplication {
|
|
1304
1368
|
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1305
1369
|
value: input.schema
|
1306
1370
|
})].every(flag => flag);
|
1307
|
-
const $
|
1371
|
+
const $vo40 = (input, _path, _exceptionable = true) => [("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $report(_exceptionable, {
|
1308
1372
|
path: _path + ".schema",
|
1309
1373
|
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1310
1374
|
value: input.schema
|
@@ -1313,7 +1377,7 @@ class MigrateApplication {
|
|
1313
1377
|
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1314
1378
|
value: input.schema
|
1315
1379
|
})].every(flag => flag);
|
1316
|
-
const $
|
1380
|
+
const $vo41 = (input, _path, _exceptionable = true) => [("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $report(_exceptionable, {
|
1317
1381
|
path: _path + ".schema",
|
1318
1382
|
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1319
1383
|
value: input.schema
|
@@ -1322,7 +1386,7 @@ class MigrateApplication {
|
|
1322
1386
|
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1323
1387
|
value: input.schema
|
1324
1388
|
})].every(flag => flag);
|
1325
|
-
const $
|
1389
|
+
const $vo42 = (input, _path, _exceptionable = true) => [("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $report(_exceptionable, {
|
1326
1390
|
path: _path + ".schema",
|
1327
1391
|
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1328
1392
|
value: input.schema
|
@@ -1331,7 +1395,7 @@ class MigrateApplication {
|
|
1331
1395
|
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1332
1396
|
value: input.schema
|
1333
1397
|
})].every(flag => flag);
|
1334
|
-
const $
|
1398
|
+
const $vo43 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
1335
1399
|
const value = input[key];
|
1336
1400
|
if (undefined === value)
|
1337
1401
|
return true;
|
@@ -1339,13 +1403,13 @@ class MigrateApplication {
|
|
1339
1403
|
path: _path + $join(key),
|
1340
1404
|
expected: "__type.o5",
|
1341
1405
|
value: value
|
1342
|
-
})) && $
|
1406
|
+
})) && $vo44(value, _path + $join(key), true && _exceptionable) || $report(_exceptionable, {
|
1343
1407
|
path: _path + $join(key),
|
1344
1408
|
expected: "__type.o5",
|
1345
1409
|
value: value
|
1346
1410
|
});
|
1347
1411
|
}).every(flag => flag)].every(flag => flag);
|
1348
|
-
const $
|
1412
|
+
const $vo44 = (input, _path, _exceptionable = true) => [undefined === input.description || "string" === typeof input.description || $report(_exceptionable, {
|
1349
1413
|
path: _path + ".description",
|
1350
1414
|
expected: "(string | undefined)",
|
1351
1415
|
value: input.description
|
@@ -1353,7 +1417,7 @@ class MigrateApplication {
|
|
1353
1417
|
path: _path + ".content",
|
1354
1418
|
expected: "(ISwaggerRoute.IContent | undefined)",
|
1355
1419
|
value: input.content
|
1356
|
-
})) && $
|
1420
|
+
})) && $vo37(input.content, _path + ".content", true && _exceptionable) || $report(_exceptionable, {
|
1357
1421
|
path: _path + ".content",
|
1358
1422
|
expected: "(ISwaggerRoute.IContent | undefined)",
|
1359
1423
|
value: input.content
|
@@ -1362,7 +1426,7 @@ class MigrateApplication {
|
|
1362
1426
|
expected: "(boolean | undefined)",
|
1363
1427
|
value: input["x-nestia-encrypted"]
|
1364
1428
|
})].every(flag => flag);
|
1365
|
-
const $
|
1429
|
+
const $vo45 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
1366
1430
|
const value = input[key];
|
1367
1431
|
if (undefined === value)
|
1368
1432
|
return true;
|
@@ -1380,7 +1444,7 @@ class MigrateApplication {
|
|
1380
1444
|
value: value
|
1381
1445
|
});
|
1382
1446
|
}).every(flag => flag)].every(flag => flag);
|
1383
|
-
const $
|
1447
|
+
const $vo46 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || $report(_exceptionable, {
|
1384
1448
|
path: _path + ".name",
|
1385
1449
|
expected: "string",
|
1386
1450
|
value: input.name
|
@@ -1392,7 +1456,7 @@ class MigrateApplication {
|
|
1392
1456
|
path: _path + ".text[" + _index16 + "]",
|
1393
1457
|
expected: "IJsDocTagInfo.IText",
|
1394
1458
|
value: elem
|
1395
|
-
})) && $
|
1459
|
+
})) && $vo47(elem, _path + ".text[" + _index16 + "]", true && _exceptionable) || $report(_exceptionable, {
|
1396
1460
|
path: _path + ".text[" + _index16 + "]",
|
1397
1461
|
expected: "IJsDocTagInfo.IText",
|
1398
1462
|
value: elem
|
@@ -1401,7 +1465,7 @@ class MigrateApplication {
|
|
1401
1465
|
expected: "(Array<IJsDocTagInfo.IText> | undefined)",
|
1402
1466
|
value: input.text
|
1403
1467
|
})].every(flag => flag);
|
1404
|
-
const $
|
1468
|
+
const $vo47 = (input, _path, _exceptionable = true) => ["string" === typeof input.text || $report(_exceptionable, {
|
1405
1469
|
path: _path + ".text",
|
1406
1470
|
expected: "string",
|
1407
1471
|
value: input.text
|
@@ -1412,39 +1476,51 @@ class MigrateApplication {
|
|
1412
1476
|
})].every(flag => flag);
|
1413
1477
|
const $vu0 = (input, _path, _exceptionable = true) => (() => {
|
1414
1478
|
if ("null" === input.type)
|
1415
|
-
return $vo8(input, _path, true && _exceptionable);
|
1416
|
-
else if (undefined !== input.anyOf)
|
1417
1479
|
return $vo9(input, _path, true && _exceptionable);
|
1418
|
-
else if (undefined !== input.
|
1480
|
+
else if (undefined !== input.anyOf)
|
1419
1481
|
return $vo10(input, _path, true && _exceptionable);
|
1420
|
-
else if (
|
1482
|
+
else if (undefined !== input.oneOf)
|
1421
1483
|
return $vo11(input, _path, true && _exceptionable);
|
1484
|
+
else if ("boolean" === input.type)
|
1485
|
+
return $vo12(input, _path, true && _exceptionable);
|
1422
1486
|
else if ("number" === input.type)
|
1423
|
-
return $
|
1487
|
+
return $vo14(input, _path, true && _exceptionable);
|
1424
1488
|
else if ("integer" === input.type)
|
1425
|
-
return $
|
1489
|
+
return $vo13(input, _path, true && _exceptionable);
|
1426
1490
|
else if ("string" === input.type)
|
1427
|
-
return $vo14(input, _path, true && _exceptionable);
|
1428
|
-
else if ("array" === input.type)
|
1429
1491
|
return $vo15(input, _path, true && _exceptionable);
|
1430
|
-
else if ("
|
1492
|
+
else if ("array" === input.type)
|
1431
1493
|
return $vo16(input, _path, true && _exceptionable);
|
1432
|
-
else if (
|
1494
|
+
else if ("object" === input.type)
|
1433
1495
|
return $vo17(input, _path, true && _exceptionable);
|
1496
|
+
else if (undefined !== input.$ref)
|
1497
|
+
return $vo19(input, _path, true && _exceptionable);
|
1434
1498
|
else
|
1435
|
-
return $
|
1499
|
+
return $vo8(input, _path, true && _exceptionable);
|
1436
1500
|
})();
|
1437
1501
|
const $vu1 = (input, _path, _exceptionable = true) => (() => {
|
1502
|
+
if (undefined !== input["in"])
|
1503
|
+
return $vo7(input, _path, true && _exceptionable);
|
1504
|
+
else if (undefined !== input.$ref)
|
1505
|
+
return $vo35(input, _path, true && _exceptionable);
|
1506
|
+
else
|
1507
|
+
return $report(_exceptionable, {
|
1508
|
+
path: _path,
|
1509
|
+
expected: "(ISwaggerRouteParameter | ISwaggerRouteParameter.IReference)",
|
1510
|
+
value: input
|
1511
|
+
});
|
1512
|
+
})();
|
1513
|
+
const $vu2 = (input, _path, _exceptionable = true) => (() => {
|
1438
1514
|
if ("basic" === input.scheme)
|
1439
|
-
return $
|
1515
|
+
return $vo22(input, _path, true && _exceptionable);
|
1440
1516
|
else if ("bearer" === input.scheme)
|
1441
|
-
return $
|
1517
|
+
return $vo23(input, _path, true && _exceptionable);
|
1442
1518
|
else if ("apiKey" === input.type)
|
1443
|
-
return $
|
1519
|
+
return $vo24(input, _path, true && _exceptionable);
|
1444
1520
|
else if ("openIdConnect" === input.type)
|
1445
|
-
return $
|
1521
|
+
return $vo25(input, _path, true && _exceptionable);
|
1446
1522
|
else if ("oauth2" === input.type)
|
1447
|
-
return $
|
1523
|
+
return $vo26(input, _path, true && _exceptionable);
|
1448
1524
|
else
|
1449
1525
|
return $report(_exceptionable, {
|
1450
1526
|
path: _path,
|