@nestia/migrate 0.3.0 → 0.4.1
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/README.md +2 -2
- package/lib/NestiaMigrateApplication.js +198 -168
- package/lib/NestiaMigrateApplication.js.map +1 -1
- package/lib/bundles/TEMPLATE.js +2 -2
- package/lib/programmers/ControllerProgrammer.js +1 -1
- package/lib/programmers/ControllerProgrammer.js.map +1 -1
- package/lib/programmers/DtoProgrammer.js +1 -1
- package/lib/programmers/DtoProgrammer.js.map +1 -1
- package/lib/programmers/ImportProgrammer.d.ts +2 -0
- package/lib/programmers/ImportProgrammer.js +5 -2
- package/lib/programmers/ImportProgrammer.js.map +1 -1
- package/lib/programmers/SchemaProgrammer.js +30 -12
- package/lib/programmers/SchemaProgrammer.js.map +1 -1
- package/lib/structures/ISwaggeSchema.d.ts +4 -1
- package/lib/utils/JsonTypeChecker.d.ts +1 -0
- package/lib/utils/JsonTypeChecker.js +1 -0
- package/lib/utils/JsonTypeChecker.js.map +1 -1
- package/package.json +4 -4
- package/src/bundles/TEMPLATE.ts +2 -2
- package/src/programmers/ControllerProgrammer.ts +1 -1
- package/src/programmers/DtoProgrammer.ts +1 -1
- package/src/programmers/ImportProgrammer.ts +4 -1
- package/src/programmers/SchemaProgrammer.ts +32 -9
- package/src/structures/ISwaggeSchema.ts +5 -0
- package/src/utils/JsonTypeChecker.ts +4 -0
@@ -34,12 +34,12 @@ class NestiaMigrateApplication {
|
|
34
34
|
};
|
35
35
|
this.swagger = (input => {
|
36
36
|
const __is = input => {
|
37
|
-
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) && $
|
37
|
+
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) && $io30(input.paths)) && (undefined === input.security || Array.isArray(input.security) && input.security.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io40(elem)));
|
38
38
|
const $io1 = input => "string" === typeof input.title && (undefined === input.description || "string" === typeof input.description) && (undefined === input.termsOfService || "string" === typeof input.termsOfService && /^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.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;
|
39
39
|
const $io2 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.url || "string" === typeof input.url && /^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.url)) && (undefined === input.email || "string" === typeof input.email && /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(input.email));
|
40
40
|
const $io3 = input => "string" === typeof input.name && (undefined === input.url || "string" === typeof input.url && /^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.url));
|
41
41
|
const $io4 = input => "string" === typeof input.url && (undefined === input.description || "string" === typeof input.description);
|
42
|
-
const $io5 = input => (undefined === input.schemas || "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && $io6(input.schemas)) && (undefined === input.securitySchemes || "object" === typeof input.securitySchemes && null !== input.securitySchemes && false === Array.isArray(input.securitySchemes) && $
|
42
|
+
const $io5 = input => (undefined === input.schemas || "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && $io6(input.schemas)) && (undefined === input.securitySchemes || "object" === typeof input.securitySchemes && null !== input.securitySchemes && false === Array.isArray(input.securitySchemes) && $io19(input.securitySchemes));
|
43
43
|
const $io6 = input => Object.keys(input).every(key => {
|
44
44
|
const value = input[key];
|
45
45
|
if (undefined === value)
|
@@ -49,17 +49,18 @@ class NestiaMigrateApplication {
|
|
49
49
|
return true;
|
50
50
|
});
|
51
51
|
const $io7 = 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"]);
|
52
|
-
const $io8 = input =>
|
53
|
-
const $io9 = input => Array.isArray(input.
|
54
|
-
const $io10 = input =>
|
55
|
-
const $io11 = input => (undefined === input["default"] || "
|
56
|
-
const $io12 = 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) && "
|
57
|
-
const $io13 = input => (undefined === input["default"] || "
|
58
|
-
const $io14 = input => "
|
59
|
-
const $io15 = input =>
|
60
|
-
const $io16 = input => "string" === typeof input
|
61
|
-
const $io17 = input =>
|
62
|
-
const $io18 = input =>
|
52
|
+
const $io8 = 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"]);
|
53
|
+
const $io9 = 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"]);
|
54
|
+
const $io10 = 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"]);
|
55
|
+
const $io11 = 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"]);
|
56
|
+
const $io12 = 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"]);
|
57
|
+
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) && "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"]);
|
58
|
+
const $io14 = 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"]);
|
59
|
+
const $io15 = 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"] && $io18(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"]);
|
60
|
+
const $io16 = input => (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io6(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"]) && $io6(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"]);
|
61
|
+
const $io17 = 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"]);
|
62
|
+
const $io18 = 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"]);
|
63
|
+
const $io19 = input => Object.keys(input).every(key => {
|
63
64
|
const value = input[key];
|
64
65
|
if (undefined === value)
|
65
66
|
return true;
|
@@ -67,14 +68,14 @@ class NestiaMigrateApplication {
|
|
67
68
|
return "object" === typeof value && null !== value && $iu1(value);
|
68
69
|
return true;
|
69
70
|
});
|
70
|
-
const $
|
71
|
-
const $
|
72
|
-
const $
|
73
|
-
const $
|
74
|
-
const $
|
75
|
-
const $
|
76
|
-
const $
|
77
|
-
const $
|
71
|
+
const $io20 = input => "http" === input.type && "basic" === input.scheme;
|
72
|
+
const $io21 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat);
|
73
|
+
const $io22 = input => "apiKey" === input.type && ("header" === input["in"] || "query" === input["in"] || "cookie" === input["in"]) && "string" === typeof input.name;
|
74
|
+
const $io23 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl;
|
75
|
+
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);
|
76
|
+
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 && $io29(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && $io29(input.clientCredentials));
|
77
|
+
const $io26 = input => "string" === typeof input.authorizationUrl && "string" === typeof input.tokenUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io27(input.scopes));
|
78
|
+
const $io27 = input => Object.keys(input).every(key => {
|
78
79
|
const value = input[key];
|
79
80
|
if (undefined === value)
|
80
81
|
return true;
|
@@ -82,40 +83,40 @@ class NestiaMigrateApplication {
|
|
82
83
|
return "string" === typeof value;
|
83
84
|
return true;
|
84
85
|
});
|
85
|
-
const $
|
86
|
-
const $
|
87
|
-
const $
|
86
|
+
const $io28 = input => "string" === typeof input.authorizationUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io27(input.scopes));
|
87
|
+
const $io29 = input => "string" === typeof input.tokenUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io27(input.scopes));
|
88
|
+
const $io30 = input => Object.keys(input).every(key => {
|
88
89
|
const value = input[key];
|
89
90
|
if (undefined === value)
|
90
91
|
return true;
|
91
92
|
if (RegExp(/(.*)/).test(key))
|
92
|
-
return "object" === typeof value && null !== value && false === Array.isArray(value) && $
|
93
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io31(value);
|
93
94
|
return true;
|
94
95
|
});
|
95
|
-
const $
|
96
|
+
const $io31 = input => Object.keys(input).every(key => {
|
96
97
|
const value = input[key];
|
97
98
|
if (undefined === value)
|
98
99
|
return true;
|
99
100
|
if (RegExp(/(.*)/).test(key))
|
100
|
-
return "object" === typeof value && null !== value && false === Array.isArray(value) && $
|
101
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io32(value);
|
101
102
|
return true;
|
102
103
|
});
|
103
|
-
const $
|
104
|
-
const $
|
105
|
-
const $
|
106
|
-
const $
|
107
|
-
const $io35 = input => "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema);
|
104
|
+
const $io32 = input => (undefined === input.parameters || Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && $io33(elem))) && (undefined === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && $io34(input.requestBody)) && (undefined === input.responses || "object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) && $io38(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) && $io40(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 && $io41(elem)));
|
105
|
+
const $io33 = input => (undefined === input.name || "string" === typeof input.name) && ("header" === input["in"] || "query" === input["in"] || "cookie" === input["in"] || "path" === 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);
|
106
|
+
const $io34 = input => (undefined === input.description || "string" === typeof input.description) && ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && $io35(input.content)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input["x-nestia-encrypted"] || "boolean" === typeof input["x-nestia-encrypted"]);
|
107
|
+
const $io35 = input => (undefined === input["text/plain"] || "object" === typeof input["text/plain"] && null !== input["text/plain"] && $io36(input["text/plain"])) && (undefined === input["application/json"] || "object" === typeof input["application/json"] && null !== input["application/json"] && $io37(input["application/json"]));
|
108
108
|
const $io36 = input => "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema);
|
109
|
-
const $io37 = input =>
|
109
|
+
const $io37 = input => "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema);
|
110
|
+
const $io38 = input => Object.keys(input).every(key => {
|
110
111
|
const value = input[key];
|
111
112
|
if (undefined === value)
|
112
113
|
return true;
|
113
114
|
if (RegExp(/(.*)/).test(key))
|
114
|
-
return "object" === typeof value && null !== value && false === Array.isArray(value) && $
|
115
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io39(value);
|
115
116
|
return true;
|
116
117
|
});
|
117
|
-
const $
|
118
|
-
const $
|
118
|
+
const $io39 = input => (undefined === input.description || "string" === typeof input.description) && (undefined === input.content || "object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && $io35(input.content)) && (undefined === input["x-nestia-encrypted"] || "boolean" === typeof input["x-nestia-encrypted"]);
|
119
|
+
const $io40 = input => Object.keys(input).every(key => {
|
119
120
|
const value = input[key];
|
120
121
|
if (undefined === value)
|
121
122
|
return true;
|
@@ -123,41 +124,43 @@ class NestiaMigrateApplication {
|
|
123
124
|
return Array.isArray(value) && value.every(elem => "string" === typeof elem);
|
124
125
|
return true;
|
125
126
|
});
|
126
|
-
const $
|
127
|
-
const $
|
127
|
+
const $io41 = input => "string" === typeof input.name && (undefined === input.text || Array.isArray(input.text) && input.text.every(elem => "object" === typeof elem && null !== elem && $io42(elem)));
|
128
|
+
const $io42 = input => "string" === typeof input.text && "string" === typeof input.kind;
|
128
129
|
const $iu0 = input => (() => {
|
129
|
-
if (
|
130
|
+
if ("null" === input.type)
|
130
131
|
return $io8(input);
|
131
|
-
else if (undefined !== input.
|
132
|
+
else if (undefined !== input.anyOf)
|
132
133
|
return $io9(input);
|
133
|
-
else if (
|
134
|
+
else if (undefined !== input.oneOf)
|
134
135
|
return $io10(input);
|
136
|
+
else if ("boolean" === input.type)
|
137
|
+
return $io11(input);
|
135
138
|
else if ("number" === input.type)
|
136
|
-
return $
|
139
|
+
return $io13(input);
|
137
140
|
else if ("integer" === input.type)
|
138
|
-
return $
|
141
|
+
return $io12(input);
|
139
142
|
else if ("string" === input.type)
|
140
|
-
return $io13(input);
|
141
|
-
else if ("array" === input.type)
|
142
143
|
return $io14(input);
|
143
|
-
else if ("
|
144
|
+
else if ("array" === input.type)
|
144
145
|
return $io15(input);
|
145
|
-
else if (
|
146
|
+
else if ("object" === input.type)
|
146
147
|
return $io16(input);
|
148
|
+
else if (undefined !== input.$ref)
|
149
|
+
return $io17(input);
|
147
150
|
else
|
148
151
|
return $io7(input);
|
149
152
|
})();
|
150
153
|
const $iu1 = input => (() => {
|
151
154
|
if ("basic" === input.scheme)
|
152
|
-
return $io19(input);
|
153
|
-
else if ("bearer" === input.scheme)
|
154
155
|
return $io20(input);
|
155
|
-
else if ("
|
156
|
+
else if ("bearer" === input.scheme)
|
156
157
|
return $io21(input);
|
157
|
-
else if ("
|
158
|
+
else if ("apiKey" === input.type)
|
158
159
|
return $io22(input);
|
159
|
-
else if ("
|
160
|
+
else if ("openIdConnect" === input.type)
|
160
161
|
return $io23(input);
|
162
|
+
else if ("oauth2" === input.type)
|
163
|
+
return $io24(input);
|
161
164
|
else
|
162
165
|
return false;
|
163
166
|
})();
|
@@ -207,7 +210,7 @@ class NestiaMigrateApplication {
|
|
207
210
|
path: _path + ".paths",
|
208
211
|
expected: "Record<string, ISwagger.IPath>",
|
209
212
|
value: input.paths
|
210
|
-
})) && $
|
213
|
+
})) && $ao30(input.paths, _path + ".paths", true && _exceptionable) || $guard(_exceptionable, {
|
211
214
|
path: _path + ".paths",
|
212
215
|
expected: "Record<string, ISwagger.IPath>",
|
213
216
|
value: input.paths
|
@@ -219,7 +222,7 @@ class NestiaMigrateApplication {
|
|
219
222
|
path: _path + ".security[" + _index2 + "]",
|
220
223
|
expected: "Record<string, Array<string>>",
|
221
224
|
value: elem
|
222
|
-
})) && $
|
225
|
+
})) && $ao40(elem, _path + ".security[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
223
226
|
path: _path + ".security[" + _index2 + "]",
|
224
227
|
expected: "Record<string, Array<string>>",
|
225
228
|
value: elem
|
@@ -238,11 +241,11 @@ class NestiaMigrateApplication {
|
|
238
241
|
value: input.description
|
239
242
|
})) && (undefined === input.termsOfService || "string" === typeof input.termsOfService && (/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.termsOfService) || $guard(_exceptionable, {
|
240
243
|
path: _path + ".termsOfService",
|
241
|
-
expected: "string & Format
|
244
|
+
expected: "string & Format<\"url\">",
|
242
245
|
value: input.termsOfService
|
243
246
|
})) || $guard(_exceptionable, {
|
244
247
|
path: _path + ".termsOfService",
|
245
|
-
expected: "((string & Format
|
248
|
+
expected: "((string & Format<\"url\">) | undefined)",
|
246
249
|
value: input.termsOfService
|
247
250
|
})) && (undefined === input.contact || ("object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) || $guard(_exceptionable, {
|
248
251
|
path: _path + ".contact",
|
@@ -271,19 +274,19 @@ class NestiaMigrateApplication {
|
|
271
274
|
value: input.name
|
272
275
|
})) && (undefined === input.url || "string" === typeof input.url && (/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.url) || $guard(_exceptionable, {
|
273
276
|
path: _path + ".url",
|
274
|
-
expected: "string & Format
|
277
|
+
expected: "string & Format<\"url\">",
|
275
278
|
value: input.url
|
276
279
|
})) || $guard(_exceptionable, {
|
277
280
|
path: _path + ".url",
|
278
|
-
expected: "((string & Format
|
281
|
+
expected: "((string & Format<\"url\">) | undefined)",
|
279
282
|
value: input.url
|
280
283
|
})) && (undefined === input.email || "string" === typeof input.email && (/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(input.email) || $guard(_exceptionable, {
|
281
284
|
path: _path + ".email",
|
282
|
-
expected: "string & Format
|
285
|
+
expected: "string & Format<\"email\">",
|
283
286
|
value: input.email
|
284
287
|
})) || $guard(_exceptionable, {
|
285
288
|
path: _path + ".email",
|
286
|
-
expected: "((string & Format
|
289
|
+
expected: "((string & Format<\"email\">) | undefined)",
|
287
290
|
value: input.email
|
288
291
|
}));
|
289
292
|
const $ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
|
@@ -292,11 +295,11 @@ class NestiaMigrateApplication {
|
|
292
295
|
value: input.name
|
293
296
|
})) && (undefined === input.url || "string" === typeof input.url && (/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.url) || $guard(_exceptionable, {
|
294
297
|
path: _path + ".url",
|
295
|
-
expected: "string & Format
|
298
|
+
expected: "string & Format<\"url\">",
|
296
299
|
value: input.url
|
297
300
|
})) || $guard(_exceptionable, {
|
298
301
|
path: _path + ".url",
|
299
|
-
expected: "((string & Format
|
302
|
+
expected: "((string & Format<\"url\">) | undefined)",
|
300
303
|
value: input.url
|
301
304
|
}));
|
302
305
|
const $ao4 = (input, _path, _exceptionable = true) => ("string" === typeof input.url || $guard(_exceptionable, {
|
@@ -320,7 +323,7 @@ class NestiaMigrateApplication {
|
|
320
323
|
path: _path + ".securitySchemes",
|
321
324
|
expected: "(Record<string, ISwaggerSecurity> | undefined)",
|
322
325
|
value: input.securitySchemes
|
323
|
-
})) && $
|
326
|
+
})) && $ao19(input.securitySchemes, _path + ".securitySchemes", true && _exceptionable) || $guard(_exceptionable, {
|
324
327
|
path: _path + ".securitySchemes",
|
325
328
|
expected: "(Record<string, ISwaggerSecurity> | undefined)",
|
326
329
|
value: input.securitySchemes
|
@@ -332,11 +335,11 @@ class NestiaMigrateApplication {
|
|
332
335
|
if (RegExp(/(.*)/).test(key))
|
333
336
|
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
334
337
|
path: _path + $join(key),
|
335
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
338
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
336
339
|
value: value
|
337
340
|
})) && $au0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
338
341
|
path: _path + $join(key),
|
339
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
342
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
340
343
|
value: value
|
341
344
|
});
|
342
345
|
return true;
|
@@ -370,17 +373,42 @@ class NestiaMigrateApplication {
|
|
370
373
|
expected: "(boolean | undefined)",
|
371
374
|
value: input["x-typia-rest"]
|
372
375
|
}));
|
373
|
-
const $ao8 = (input, _path, _exceptionable = true) => (
|
376
|
+
const $ao8 = (input, _path, _exceptionable = true) => ("null" === input.type || $guard(_exceptionable, {
|
377
|
+
path: _path + ".type",
|
378
|
+
expected: "\"null\"",
|
379
|
+
value: input.type
|
380
|
+
})) && (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
381
|
+
path: _path + ".title",
|
382
|
+
expected: "(string | undefined)",
|
383
|
+
value: input.title
|
384
|
+
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
385
|
+
path: _path + ".description",
|
386
|
+
expected: "(string | undefined)",
|
387
|
+
value: input.description
|
388
|
+
})) && (undefined === input.deprecated || "boolean" === typeof input.deprecated || $guard(_exceptionable, {
|
389
|
+
path: _path + ".deprecated",
|
390
|
+
expected: "(boolean | undefined)",
|
391
|
+
value: input.deprecated
|
392
|
+
})) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"] || $guard(_exceptionable, {
|
393
|
+
path: _path + "[\"x-typia-optional\"]",
|
394
|
+
expected: "(boolean | undefined)",
|
395
|
+
value: input["x-typia-optional"]
|
396
|
+
})) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"] || $guard(_exceptionable, {
|
397
|
+
path: _path + "[\"x-typia-rest\"]",
|
398
|
+
expected: "(boolean | undefined)",
|
399
|
+
value: input["x-typia-rest"]
|
400
|
+
}));
|
401
|
+
const $ao9 = (input, _path, _exceptionable = true) => ((Array.isArray(input.anyOf) || $guard(_exceptionable, {
|
374
402
|
path: _path + ".anyOf",
|
375
403
|
expected: "Array<ISwaggerSchema>",
|
376
404
|
value: input.anyOf
|
377
405
|
})) && input.anyOf.every((elem, _index3) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
378
406
|
path: _path + ".anyOf[" + _index3 + "]",
|
379
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
407
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
380
408
|
value: elem
|
381
409
|
})) && $au0(elem, _path + ".anyOf[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
382
410
|
path: _path + ".anyOf[" + _index3 + "]",
|
383
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
411
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
384
412
|
value: elem
|
385
413
|
})) || $guard(_exceptionable, {
|
386
414
|
path: _path + ".anyOf",
|
@@ -407,17 +435,17 @@ class NestiaMigrateApplication {
|
|
407
435
|
expected: "(boolean | undefined)",
|
408
436
|
value: input["x-typia-rest"]
|
409
437
|
}));
|
410
|
-
const $
|
438
|
+
const $ao10 = (input, _path, _exceptionable = true) => ((Array.isArray(input.oneOf) || $guard(_exceptionable, {
|
411
439
|
path: _path + ".oneOf",
|
412
440
|
expected: "Array<ISwaggerSchema>",
|
413
441
|
value: input.oneOf
|
414
442
|
})) && input.oneOf.every((elem, _index4) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
415
443
|
path: _path + ".oneOf[" + _index4 + "]",
|
416
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
444
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
417
445
|
value: elem
|
418
446
|
})) && $au0(elem, _path + ".oneOf[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
419
447
|
path: _path + ".oneOf[" + _index4 + "]",
|
420
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
448
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
421
449
|
value: elem
|
422
450
|
})) || $guard(_exceptionable, {
|
423
451
|
path: _path + ".oneOf",
|
@@ -444,7 +472,7 @@ class NestiaMigrateApplication {
|
|
444
472
|
expected: "(boolean | undefined)",
|
445
473
|
value: input["x-typia-rest"]
|
446
474
|
}));
|
447
|
-
const $
|
475
|
+
const $ao11 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "boolean" === typeof input["default"] || $guard(_exceptionable, {
|
448
476
|
path: _path + "[\"default\"]",
|
449
477
|
expected: "(boolean | undefined)",
|
450
478
|
value: input["default"]
|
@@ -489,13 +517,13 @@ class NestiaMigrateApplication {
|
|
489
517
|
expected: "(boolean | undefined)",
|
490
518
|
value: input["x-typia-rest"]
|
491
519
|
}));
|
492
|
-
const $
|
520
|
+
const $ao12 = (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, {
|
493
521
|
path: _path + "[\"default\"]",
|
494
|
-
expected: "number & Type
|
522
|
+
expected: "number & Type<\"int32\">",
|
495
523
|
value: input["default"]
|
496
524
|
})) || $guard(_exceptionable, {
|
497
525
|
path: _path + "[\"default\"]",
|
498
|
-
expected: "((number & Type
|
526
|
+
expected: "((number & Type<\"int32\">) | undefined)",
|
499
527
|
value: input["default"]
|
500
528
|
})) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
501
529
|
path: _path + "[\"enum\"]",
|
@@ -511,19 +539,19 @@ class NestiaMigrateApplication {
|
|
511
539
|
value: input["enum"]
|
512
540
|
})) && (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -2147483648 <= input.minimum && input.minimum <= 2147483647 || $guard(_exceptionable, {
|
513
541
|
path: _path + ".minimum",
|
514
|
-
expected: "number & Type
|
542
|
+
expected: "number & Type<\"int32\">",
|
515
543
|
value: input.minimum
|
516
544
|
})) || $guard(_exceptionable, {
|
517
545
|
path: _path + ".minimum",
|
518
|
-
expected: "((number & Type
|
546
|
+
expected: "((number & Type<\"int32\">) | undefined)",
|
519
547
|
value: input.minimum
|
520
548
|
})) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -2147483648 <= input.maximum && input.maximum <= 2147483647 || $guard(_exceptionable, {
|
521
549
|
path: _path + ".maximum",
|
522
|
-
expected: "number & Type
|
550
|
+
expected: "number & Type<\"int32\">",
|
523
551
|
value: input.maximum
|
524
552
|
})) || $guard(_exceptionable, {
|
525
553
|
path: _path + ".maximum",
|
526
|
-
expected: "((number & Type
|
554
|
+
expected: "((number & Type<\"int32\">) | undefined)",
|
527
555
|
value: input.maximum
|
528
556
|
})) && (undefined === input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum || $guard(_exceptionable, {
|
529
557
|
path: _path + ".exclusiveMinimum",
|
@@ -535,11 +563,11 @@ class NestiaMigrateApplication {
|
|
535
563
|
value: input.exclusiveMaximum
|
536
564
|
})) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 4294967295 || $guard(_exceptionable, {
|
537
565
|
path: _path + ".multipleOf",
|
538
|
-
expected: "number & Type
|
566
|
+
expected: "number & Type<\"uint32\">",
|
539
567
|
value: input.multipleOf
|
540
568
|
})) || $guard(_exceptionable, {
|
541
569
|
path: _path + ".multipleOf",
|
542
|
-
expected: "((number & Type
|
570
|
+
expected: "((number & Type<\"uint32\">) | undefined)",
|
543
571
|
value: input.multipleOf
|
544
572
|
})) && ("integer" === input.type || $guard(_exceptionable, {
|
545
573
|
path: _path + ".type",
|
@@ -570,7 +598,7 @@ class NestiaMigrateApplication {
|
|
570
598
|
expected: "(boolean | undefined)",
|
571
599
|
value: input["x-typia-rest"]
|
572
600
|
}));
|
573
|
-
const $
|
601
|
+
const $ao13 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "number" === typeof input["default"] || $guard(_exceptionable, {
|
574
602
|
path: _path + "[\"default\"]",
|
575
603
|
expected: "(number | undefined)",
|
576
604
|
value: input["default"]
|
@@ -635,7 +663,7 @@ class NestiaMigrateApplication {
|
|
635
663
|
expected: "(boolean | undefined)",
|
636
664
|
value: input["x-typia-rest"]
|
637
665
|
}));
|
638
|
-
const $
|
666
|
+
const $ao14 = (input, _path, _exceptionable = true) => (undefined === input["default"] || "string" === typeof input["default"] || $guard(_exceptionable, {
|
639
667
|
path: _path + "[\"default\"]",
|
640
668
|
expected: "(string | undefined)",
|
641
669
|
value: input["default"]
|
@@ -661,19 +689,19 @@ class NestiaMigrateApplication {
|
|
661
689
|
value: input.pattern
|
662
690
|
})) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 4294967295 || $guard(_exceptionable, {
|
663
691
|
path: _path + ".minLength",
|
664
|
-
expected: "number & Type
|
692
|
+
expected: "number & Type<\"uint32\">",
|
665
693
|
value: input.minLength
|
666
694
|
})) || $guard(_exceptionable, {
|
667
695
|
path: _path + ".minLength",
|
668
|
-
expected: "((number & Type
|
696
|
+
expected: "((number & Type<\"uint32\">) | undefined)",
|
669
697
|
value: input.minLength
|
670
698
|
})) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 4294967295 || $guard(_exceptionable, {
|
671
699
|
path: _path + ".maxLength",
|
672
|
-
expected: "number & Type
|
700
|
+
expected: "number & Type<\"uint32\">",
|
673
701
|
value: input.maxLength
|
674
702
|
})) || $guard(_exceptionable, {
|
675
703
|
path: _path + ".maxLength",
|
676
|
-
expected: "((number & Type
|
704
|
+
expected: "((number & Type<\"uint32\">) | undefined)",
|
677
705
|
value: input.maxLength
|
678
706
|
})) && ("string" === input.type || $guard(_exceptionable, {
|
679
707
|
path: _path + ".type",
|
@@ -704,35 +732,35 @@ class NestiaMigrateApplication {
|
|
704
732
|
expected: "(boolean | undefined)",
|
705
733
|
value: input["x-typia-rest"]
|
706
734
|
}));
|
707
|
-
const $
|
735
|
+
const $ao15 = (input, _path, _exceptionable = true) => (("object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) || $guard(_exceptionable, {
|
708
736
|
path: _path + ".items",
|
709
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
737
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
710
738
|
value: input.items
|
711
739
|
})) && $au0(input.items, _path + ".items", true && _exceptionable) || $guard(_exceptionable, {
|
712
740
|
path: _path + ".items",
|
713
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
741
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
714
742
|
value: input.items
|
715
743
|
})) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 4294967295 || $guard(_exceptionable, {
|
716
744
|
path: _path + ".minItems",
|
717
|
-
expected: "number & Type
|
745
|
+
expected: "number & Type<\"uint32\">",
|
718
746
|
value: input.minItems
|
719
747
|
})) || $guard(_exceptionable, {
|
720
748
|
path: _path + ".minItems",
|
721
|
-
expected: "((number & Type
|
749
|
+
expected: "((number & Type<\"uint32\">) | undefined)",
|
722
750
|
value: input.minItems
|
723
751
|
})) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 4294967295 || $guard(_exceptionable, {
|
724
752
|
path: _path + ".maxItems",
|
725
|
-
expected: "number & Type
|
753
|
+
expected: "number & Type<\"uint32\">",
|
726
754
|
value: input.maxItems
|
727
755
|
})) || $guard(_exceptionable, {
|
728
756
|
path: _path + ".maxItems",
|
729
|
-
expected: "((number & Type
|
757
|
+
expected: "((number & Type<\"uint32\">) | undefined)",
|
730
758
|
value: input.maxItems
|
731
759
|
})) && (undefined === input["x-typia-tuple"] || ("object" === typeof input["x-typia-tuple"] && null !== input["x-typia-tuple"] || $guard(_exceptionable, {
|
732
760
|
path: _path + "[\"x-typia-tuple\"]",
|
733
761
|
expected: "(ISwaggerSchema.ITuple | undefined)",
|
734
762
|
value: input["x-typia-tuple"]
|
735
|
-
})) && $
|
763
|
+
})) && $ao18(input["x-typia-tuple"], _path + "[\"x-typia-tuple\"]", true && _exceptionable) || $guard(_exceptionable, {
|
736
764
|
path: _path + "[\"x-typia-tuple\"]",
|
737
765
|
expected: "(ISwaggerSchema.ITuple | undefined)",
|
738
766
|
value: input["x-typia-tuple"]
|
@@ -765,7 +793,7 @@ class NestiaMigrateApplication {
|
|
765
793
|
expected: "(boolean | undefined)",
|
766
794
|
value: input["x-typia-rest"]
|
767
795
|
}));
|
768
|
-
const $
|
796
|
+
const $ao16 = (input, _path, _exceptionable = true) => (undefined === input.properties || ("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) || $guard(_exceptionable, {
|
769
797
|
path: _path + ".properties",
|
770
798
|
expected: "(Record<string, ISwaggerSchema> | undefined)",
|
771
799
|
value: input.properties
|
@@ -787,15 +815,15 @@ class NestiaMigrateApplication {
|
|
787
815
|
value: input.required
|
788
816
|
})) && ((null !== input.additionalProperties || $guard(_exceptionable, {
|
789
817
|
path: _path + ".additionalProperties",
|
790
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | boolean | undefined)",
|
818
|
+
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)",
|
791
819
|
value: input.additionalProperties
|
792
820
|
})) && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || ("object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) || $guard(_exceptionable, {
|
793
821
|
path: _path + ".additionalProperties",
|
794
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | boolean | undefined)",
|
822
|
+
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)",
|
795
823
|
value: input.additionalProperties
|
796
824
|
})) && $au0(input.additionalProperties, _path + ".additionalProperties", true && _exceptionable) || $guard(_exceptionable, {
|
797
825
|
path: _path + ".additionalProperties",
|
798
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown | boolean | undefined)",
|
826
|
+
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)",
|
799
827
|
value: input.additionalProperties
|
800
828
|
}))) && (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, {
|
801
829
|
path: _path + "[\"x-typia-patternProperties\"]",
|
@@ -834,7 +862,7 @@ class NestiaMigrateApplication {
|
|
834
862
|
expected: "(boolean | undefined)",
|
835
863
|
value: input["x-typia-rest"]
|
836
864
|
}));
|
837
|
-
const $
|
865
|
+
const $ao17 = (input, _path, _exceptionable = true) => ("string" === typeof input.$ref || $guard(_exceptionable, {
|
838
866
|
path: _path + ".$ref",
|
839
867
|
expected: "string",
|
840
868
|
value: input.$ref
|
@@ -859,17 +887,17 @@ class NestiaMigrateApplication {
|
|
859
887
|
expected: "(boolean | undefined)",
|
860
888
|
value: input["x-typia-rest"]
|
861
889
|
}));
|
862
|
-
const $
|
890
|
+
const $ao18 = (input, _path, _exceptionable = true) => ((Array.isArray(input.items) || $guard(_exceptionable, {
|
863
891
|
path: _path + ".items",
|
864
892
|
expected: "Array<ISwaggerSchema>",
|
865
893
|
value: input.items
|
866
894
|
})) && input.items.every((elem, _index10) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
867
895
|
path: _path + ".items[" + _index10 + "]",
|
868
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
896
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
869
897
|
value: elem
|
870
898
|
})) && $au0(elem, _path + ".items[" + _index10 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
871
899
|
path: _path + ".items[" + _index10 + "]",
|
872
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
900
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
873
901
|
value: elem
|
874
902
|
})) || $guard(_exceptionable, {
|
875
903
|
path: _path + ".items",
|
@@ -904,7 +932,7 @@ class NestiaMigrateApplication {
|
|
904
932
|
expected: "(boolean | undefined)",
|
905
933
|
value: input["x-typia-rest"]
|
906
934
|
}));
|
907
|
-
const $
|
935
|
+
const $ao19 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
908
936
|
const value = input[key];
|
909
937
|
if (undefined === value)
|
910
938
|
return true;
|
@@ -920,7 +948,7 @@ class NestiaMigrateApplication {
|
|
920
948
|
});
|
921
949
|
return true;
|
922
950
|
});
|
923
|
-
const $
|
951
|
+
const $ao20 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
924
952
|
path: _path + ".type",
|
925
953
|
expected: "\"http\"",
|
926
954
|
value: input.type
|
@@ -929,7 +957,7 @@ class NestiaMigrateApplication {
|
|
929
957
|
expected: "\"basic\"",
|
930
958
|
value: input.scheme
|
931
959
|
}));
|
932
|
-
const $
|
960
|
+
const $ao21 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
933
961
|
path: _path + ".type",
|
934
962
|
expected: "\"http\"",
|
935
963
|
value: input.type
|
@@ -942,7 +970,7 @@ class NestiaMigrateApplication {
|
|
942
970
|
expected: "(string | undefined)",
|
943
971
|
value: input.bearerFormat
|
944
972
|
}));
|
945
|
-
const $
|
973
|
+
const $ao22 = (input, _path, _exceptionable = true) => ("apiKey" === input.type || $guard(_exceptionable, {
|
946
974
|
path: _path + ".type",
|
947
975
|
expected: "\"apiKey\"",
|
948
976
|
value: input.type
|
@@ -955,7 +983,7 @@ class NestiaMigrateApplication {
|
|
955
983
|
expected: "string",
|
956
984
|
value: input.name
|
957
985
|
}));
|
958
|
-
const $
|
986
|
+
const $ao23 = (input, _path, _exceptionable = true) => ("openIdConnect" === input.type || $guard(_exceptionable, {
|
959
987
|
path: _path + ".type",
|
960
988
|
expected: "\"openIdConnect\"",
|
961
989
|
value: input.type
|
@@ -964,7 +992,7 @@ class NestiaMigrateApplication {
|
|
964
992
|
expected: "string",
|
965
993
|
value: input.openIdConnectUrl
|
966
994
|
}));
|
967
|
-
const $
|
995
|
+
const $ao24 = (input, _path, _exceptionable = true) => ("oauth2" === input.type || $guard(_exceptionable, {
|
968
996
|
path: _path + ".type",
|
969
997
|
expected: "\"oauth2\"",
|
970
998
|
value: input.type
|
@@ -972,7 +1000,7 @@ class NestiaMigrateApplication {
|
|
972
1000
|
path: _path + ".flows",
|
973
1001
|
expected: "ISwaggerSecurity.IOAuth2.IFlowSet",
|
974
1002
|
value: input.flows
|
975
|
-
})) && $
|
1003
|
+
})) && $ao25(input.flows, _path + ".flows", true && _exceptionable) || $guard(_exceptionable, {
|
976
1004
|
path: _path + ".flows",
|
977
1005
|
expected: "ISwaggerSecurity.IOAuth2.IFlowSet",
|
978
1006
|
value: input.flows
|
@@ -981,11 +1009,11 @@ class NestiaMigrateApplication {
|
|
981
1009
|
expected: "(string | undefined)",
|
982
1010
|
value: input.description
|
983
1011
|
}));
|
984
|
-
const $
|
1012
|
+
const $ao25 = (input, _path, _exceptionable = true) => (undefined === input.authorizationCode || ("object" === typeof input.authorizationCode && null !== input.authorizationCode || $guard(_exceptionable, {
|
985
1013
|
path: _path + ".authorizationCode",
|
986
1014
|
expected: "(ISwaggerSecurity.IOAuth2.IFlow | undefined)",
|
987
1015
|
value: input.authorizationCode
|
988
|
-
})) && $
|
1016
|
+
})) && $ao26(input.authorizationCode, _path + ".authorizationCode", true && _exceptionable) || $guard(_exceptionable, {
|
989
1017
|
path: _path + ".authorizationCode",
|
990
1018
|
expected: "(ISwaggerSecurity.IOAuth2.IFlow | undefined)",
|
991
1019
|
value: input.authorizationCode
|
@@ -993,7 +1021,7 @@ class NestiaMigrateApplication {
|
|
993
1021
|
path: _path + ".implicit",
|
994
1022
|
expected: "(Omit<ISwaggerSecurity.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
995
1023
|
value: input.implicit
|
996
|
-
})) && $
|
1024
|
+
})) && $ao28(input.implicit, _path + ".implicit", true && _exceptionable) || $guard(_exceptionable, {
|
997
1025
|
path: _path + ".implicit",
|
998
1026
|
expected: "(Omit<ISwaggerSecurity.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
999
1027
|
value: input.implicit
|
@@ -1001,7 +1029,7 @@ class NestiaMigrateApplication {
|
|
1001
1029
|
path: _path + ".password",
|
1002
1030
|
expected: "(Omit<ISwaggerSecurity.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1003
1031
|
value: input.password
|
1004
|
-
})) && $
|
1032
|
+
})) && $ao29(input.password, _path + ".password", true && _exceptionable) || $guard(_exceptionable, {
|
1005
1033
|
path: _path + ".password",
|
1006
1034
|
expected: "(Omit<ISwaggerSecurity.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1007
1035
|
value: input.password
|
@@ -1009,12 +1037,12 @@ class NestiaMigrateApplication {
|
|
1009
1037
|
path: _path + ".clientCredentials",
|
1010
1038
|
expected: "(Omit<ISwaggerSecurity.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1011
1039
|
value: input.clientCredentials
|
1012
|
-
})) && $
|
1040
|
+
})) && $ao29(input.clientCredentials, _path + ".clientCredentials", true && _exceptionable) || $guard(_exceptionable, {
|
1013
1041
|
path: _path + ".clientCredentials",
|
1014
1042
|
expected: "(Omit<ISwaggerSecurity.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1015
1043
|
value: input.clientCredentials
|
1016
1044
|
}));
|
1017
|
-
const $
|
1045
|
+
const $ao26 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
1018
1046
|
path: _path + ".authorizationUrl",
|
1019
1047
|
expected: "string",
|
1020
1048
|
value: input.authorizationUrl
|
@@ -1030,12 +1058,12 @@ class NestiaMigrateApplication {
|
|
1030
1058
|
path: _path + ".scopes",
|
1031
1059
|
expected: "(Record<string, string> | undefined)",
|
1032
1060
|
value: input.scopes
|
1033
|
-
})) && $
|
1061
|
+
})) && $ao27(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
1034
1062
|
path: _path + ".scopes",
|
1035
1063
|
expected: "(Record<string, string> | undefined)",
|
1036
1064
|
value: input.scopes
|
1037
1065
|
}));
|
1038
|
-
const $
|
1066
|
+
const $ao27 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1039
1067
|
const value = input[key];
|
1040
1068
|
if (undefined === value)
|
1041
1069
|
return true;
|
@@ -1047,7 +1075,7 @@ class NestiaMigrateApplication {
|
|
1047
1075
|
});
|
1048
1076
|
return true;
|
1049
1077
|
});
|
1050
|
-
const $
|
1078
|
+
const $ao28 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
1051
1079
|
path: _path + ".authorizationUrl",
|
1052
1080
|
expected: "string",
|
1053
1081
|
value: input.authorizationUrl
|
@@ -1059,12 +1087,12 @@ class NestiaMigrateApplication {
|
|
1059
1087
|
path: _path + ".scopes",
|
1060
1088
|
expected: "(Record<string, string> | undefined)",
|
1061
1089
|
value: input.scopes
|
1062
|
-
})) && $
|
1090
|
+
})) && $ao27(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
1063
1091
|
path: _path + ".scopes",
|
1064
1092
|
expected: "(Record<string, string> | undefined)",
|
1065
1093
|
value: input.scopes
|
1066
1094
|
}));
|
1067
|
-
const $
|
1095
|
+
const $ao29 = (input, _path, _exceptionable = true) => ("string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
1068
1096
|
path: _path + ".tokenUrl",
|
1069
1097
|
expected: "string",
|
1070
1098
|
value: input.tokenUrl
|
@@ -1076,12 +1104,12 @@ class NestiaMigrateApplication {
|
|
1076
1104
|
path: _path + ".scopes",
|
1077
1105
|
expected: "(Record<string, string> | undefined)",
|
1078
1106
|
value: input.scopes
|
1079
|
-
})) && $
|
1107
|
+
})) && $ao27(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
1080
1108
|
path: _path + ".scopes",
|
1081
1109
|
expected: "(Record<string, string> | undefined)",
|
1082
1110
|
value: input.scopes
|
1083
1111
|
}));
|
1084
|
-
const $
|
1112
|
+
const $ao30 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1085
1113
|
const value = input[key];
|
1086
1114
|
if (undefined === value)
|
1087
1115
|
return true;
|
@@ -1090,14 +1118,14 @@ class NestiaMigrateApplication {
|
|
1090
1118
|
path: _path + $join(key),
|
1091
1119
|
expected: "ISwagger.IPath",
|
1092
1120
|
value: value
|
1093
|
-
})) && $
|
1121
|
+
})) && $ao31(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1094
1122
|
path: _path + $join(key),
|
1095
1123
|
expected: "ISwagger.IPath",
|
1096
1124
|
value: value
|
1097
1125
|
});
|
1098
1126
|
return true;
|
1099
1127
|
});
|
1100
|
-
const $
|
1128
|
+
const $ao31 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1101
1129
|
const value = input[key];
|
1102
1130
|
if (undefined === value)
|
1103
1131
|
return true;
|
@@ -1106,14 +1134,14 @@ class NestiaMigrateApplication {
|
|
1106
1134
|
path: _path + $join(key),
|
1107
1135
|
expected: "ISwaggerRoute",
|
1108
1136
|
value: value
|
1109
|
-
})) && $
|
1137
|
+
})) && $ao32(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1110
1138
|
path: _path + $join(key),
|
1111
1139
|
expected: "ISwaggerRoute",
|
1112
1140
|
value: value
|
1113
1141
|
});
|
1114
1142
|
return true;
|
1115
1143
|
});
|
1116
|
-
const $
|
1144
|
+
const $ao32 = (input, _path, _exceptionable = true) => (undefined === input.parameters || (Array.isArray(input.parameters) || $guard(_exceptionable, {
|
1117
1145
|
path: _path + ".parameters",
|
1118
1146
|
expected: "(Array<ISwaggerRoute.IParameter> | undefined)",
|
1119
1147
|
value: input.parameters
|
@@ -1121,7 +1149,7 @@ class NestiaMigrateApplication {
|
|
1121
1149
|
path: _path + ".parameters[" + _index11 + "]",
|
1122
1150
|
expected: "ISwaggerRoute.IParameter",
|
1123
1151
|
value: elem
|
1124
|
-
})) && $
|
1152
|
+
})) && $ao33(elem, _path + ".parameters[" + _index11 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1125
1153
|
path: _path + ".parameters[" + _index11 + "]",
|
1126
1154
|
expected: "ISwaggerRoute.IParameter",
|
1127
1155
|
value: elem
|
@@ -1133,7 +1161,7 @@ class NestiaMigrateApplication {
|
|
1133
1161
|
path: _path + ".requestBody",
|
1134
1162
|
expected: "(ISwaggerRoute.IRequestBody | undefined)",
|
1135
1163
|
value: input.requestBody
|
1136
|
-
})) && $
|
1164
|
+
})) && $ao34(input.requestBody, _path + ".requestBody", true && _exceptionable) || $guard(_exceptionable, {
|
1137
1165
|
path: _path + ".requestBody",
|
1138
1166
|
expected: "(ISwaggerRoute.IRequestBody | undefined)",
|
1139
1167
|
value: input.requestBody
|
@@ -1141,7 +1169,7 @@ class NestiaMigrateApplication {
|
|
1141
1169
|
path: _path + ".responses",
|
1142
1170
|
expected: "(ISwaggerRoute.IResponseBody | undefined)",
|
1143
1171
|
value: input.responses
|
1144
|
-
})) && $
|
1172
|
+
})) && $ao38(input.responses, _path + ".responses", true && _exceptionable) || $guard(_exceptionable, {
|
1145
1173
|
path: _path + ".responses",
|
1146
1174
|
expected: "(ISwaggerRoute.IResponseBody | undefined)",
|
1147
1175
|
value: input.responses
|
@@ -1165,7 +1193,7 @@ class NestiaMigrateApplication {
|
|
1165
1193
|
path: _path + ".security[" + _index12 + "]",
|
1166
1194
|
expected: "Record<string, Array<string>>",
|
1167
1195
|
value: elem
|
1168
|
-
})) && $
|
1196
|
+
})) && $ao40(elem, _path + ".security[" + _index12 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1169
1197
|
path: _path + ".security[" + _index12 + "]",
|
1170
1198
|
expected: "Record<string, Array<string>>",
|
1171
1199
|
value: elem
|
@@ -1193,7 +1221,7 @@ class NestiaMigrateApplication {
|
|
1193
1221
|
path: _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]",
|
1194
1222
|
expected: "IJsDocTagInfo",
|
1195
1223
|
value: elem
|
1196
|
-
})) && $
|
1224
|
+
})) && $ao41(elem, _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1197
1225
|
path: _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]",
|
1198
1226
|
expected: "IJsDocTagInfo",
|
1199
1227
|
value: elem
|
@@ -1202,7 +1230,7 @@ class NestiaMigrateApplication {
|
|
1202
1230
|
expected: "(Array<IJsDocTagInfo> | undefined)",
|
1203
1231
|
value: input["x-nestia-jsDocTags"]
|
1204
1232
|
}));
|
1205
|
-
const $
|
1233
|
+
const $ao33 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
1206
1234
|
path: _path + ".name",
|
1207
1235
|
expected: "(string | undefined)",
|
1208
1236
|
value: input.name
|
@@ -1212,11 +1240,11 @@ class NestiaMigrateApplication {
|
|
1212
1240
|
value: input["in"]
|
1213
1241
|
})) && (("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $guard(_exceptionable, {
|
1214
1242
|
path: _path + ".schema",
|
1215
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1243
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1216
1244
|
value: input.schema
|
1217
1245
|
})) && $au0(input.schema, _path + ".schema", true && _exceptionable) || $guard(_exceptionable, {
|
1218
1246
|
path: _path + ".schema",
|
1219
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1247
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1220
1248
|
value: input.schema
|
1221
1249
|
})) && (undefined === input.required || "boolean" === typeof input.required || $guard(_exceptionable, {
|
1222
1250
|
path: _path + ".required",
|
@@ -1227,7 +1255,7 @@ class NestiaMigrateApplication {
|
|
1227
1255
|
expected: "(string | undefined)",
|
1228
1256
|
value: input.description
|
1229
1257
|
}));
|
1230
|
-
const $
|
1258
|
+
const $ao34 = (input, _path, _exceptionable = true) => (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1231
1259
|
path: _path + ".description",
|
1232
1260
|
expected: "(string | undefined)",
|
1233
1261
|
value: input.description
|
@@ -1235,7 +1263,7 @@ class NestiaMigrateApplication {
|
|
1235
1263
|
path: _path + ".content",
|
1236
1264
|
expected: "ISwaggerRoute.IContent",
|
1237
1265
|
value: input.content
|
1238
|
-
})) && $
|
1266
|
+
})) && $ao35(input.content, _path + ".content", true && _exceptionable) || $guard(_exceptionable, {
|
1239
1267
|
path: _path + ".content",
|
1240
1268
|
expected: "ISwaggerRoute.IContent",
|
1241
1269
|
value: input.content
|
@@ -1248,11 +1276,11 @@ class NestiaMigrateApplication {
|
|
1248
1276
|
expected: "(boolean | undefined)",
|
1249
1277
|
value: input["x-nestia-encrypted"]
|
1250
1278
|
}));
|
1251
|
-
const $
|
1279
|
+
const $ao35 = (input, _path, _exceptionable = true) => (undefined === input["text/plain"] || ("object" === typeof input["text/plain"] && null !== input["text/plain"] || $guard(_exceptionable, {
|
1252
1280
|
path: _path + "[\"text/plain\"]",
|
1253
1281
|
expected: "(__type | undefined)",
|
1254
1282
|
value: input["text/plain"]
|
1255
|
-
})) && $
|
1283
|
+
})) && $ao36(input["text/plain"], _path + "[\"text/plain\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1256
1284
|
path: _path + "[\"text/plain\"]",
|
1257
1285
|
expected: "(__type | undefined)",
|
1258
1286
|
value: input["text/plain"]
|
@@ -1260,30 +1288,30 @@ class NestiaMigrateApplication {
|
|
1260
1288
|
path: _path + "[\"application/json\"]",
|
1261
1289
|
expected: "(__type.o1 | undefined)",
|
1262
1290
|
value: input["application/json"]
|
1263
|
-
})) && $
|
1291
|
+
})) && $ao37(input["application/json"], _path + "[\"application/json\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1264
1292
|
path: _path + "[\"application/json\"]",
|
1265
1293
|
expected: "(__type.o1 | undefined)",
|
1266
1294
|
value: input["application/json"]
|
1267
1295
|
}));
|
1268
|
-
const $
|
1296
|
+
const $ao36 = (input, _path, _exceptionable = true) => ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $guard(_exceptionable, {
|
1269
1297
|
path: _path + ".schema",
|
1270
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1298
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1271
1299
|
value: input.schema
|
1272
1300
|
})) && $au0(input.schema, _path + ".schema", true && _exceptionable) || $guard(_exceptionable, {
|
1273
1301
|
path: _path + ".schema",
|
1274
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1302
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1275
1303
|
value: input.schema
|
1276
1304
|
});
|
1277
|
-
const $
|
1305
|
+
const $ao37 = (input, _path, _exceptionable = true) => ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $guard(_exceptionable, {
|
1278
1306
|
path: _path + ".schema",
|
1279
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1307
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1280
1308
|
value: input.schema
|
1281
1309
|
})) && $au0(input.schema, _path + ".schema", true && _exceptionable) || $guard(_exceptionable, {
|
1282
1310
|
path: _path + ".schema",
|
1283
|
-
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1311
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1284
1312
|
value: input.schema
|
1285
1313
|
});
|
1286
|
-
const $
|
1314
|
+
const $ao38 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1287
1315
|
const value = input[key];
|
1288
1316
|
if (undefined === value)
|
1289
1317
|
return true;
|
@@ -1292,14 +1320,14 @@ class NestiaMigrateApplication {
|
|
1292
1320
|
path: _path + $join(key),
|
1293
1321
|
expected: "__type.o2",
|
1294
1322
|
value: value
|
1295
|
-
})) && $
|
1323
|
+
})) && $ao39(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1296
1324
|
path: _path + $join(key),
|
1297
1325
|
expected: "__type.o2",
|
1298
1326
|
value: value
|
1299
1327
|
});
|
1300
1328
|
return true;
|
1301
1329
|
});
|
1302
|
-
const $
|
1330
|
+
const $ao39 = (input, _path, _exceptionable = true) => (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1303
1331
|
path: _path + ".description",
|
1304
1332
|
expected: "(string | undefined)",
|
1305
1333
|
value: input.description
|
@@ -1307,7 +1335,7 @@ class NestiaMigrateApplication {
|
|
1307
1335
|
path: _path + ".content",
|
1308
1336
|
expected: "(ISwaggerRoute.IContent | undefined)",
|
1309
1337
|
value: input.content
|
1310
|
-
})) && $
|
1338
|
+
})) && $ao35(input.content, _path + ".content", true && _exceptionable) || $guard(_exceptionable, {
|
1311
1339
|
path: _path + ".content",
|
1312
1340
|
expected: "(ISwaggerRoute.IContent | undefined)",
|
1313
1341
|
value: input.content
|
@@ -1316,7 +1344,7 @@ class NestiaMigrateApplication {
|
|
1316
1344
|
expected: "(boolean | undefined)",
|
1317
1345
|
value: input["x-nestia-encrypted"]
|
1318
1346
|
}));
|
1319
|
-
const $
|
1347
|
+
const $ao40 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1320
1348
|
const value = input[key];
|
1321
1349
|
if (undefined === value)
|
1322
1350
|
return true;
|
@@ -1336,7 +1364,7 @@ class NestiaMigrateApplication {
|
|
1336
1364
|
});
|
1337
1365
|
return true;
|
1338
1366
|
});
|
1339
|
-
const $
|
1367
|
+
const $ao41 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
|
1340
1368
|
path: _path + ".name",
|
1341
1369
|
expected: "string",
|
1342
1370
|
value: input.name
|
@@ -1348,7 +1376,7 @@ class NestiaMigrateApplication {
|
|
1348
1376
|
path: _path + ".text[" + _index16 + "]",
|
1349
1377
|
expected: "IJsDocTagInfo.IText",
|
1350
1378
|
value: elem
|
1351
|
-
})) && $
|
1379
|
+
})) && $ao42(elem, _path + ".text[" + _index16 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1352
1380
|
path: _path + ".text[" + _index16 + "]",
|
1353
1381
|
expected: "IJsDocTagInfo.IText",
|
1354
1382
|
value: elem
|
@@ -1357,7 +1385,7 @@ class NestiaMigrateApplication {
|
|
1357
1385
|
expected: "(Array<IJsDocTagInfo.IText> | undefined)",
|
1358
1386
|
value: input.text
|
1359
1387
|
}));
|
1360
|
-
const $
|
1388
|
+
const $ao42 = (input, _path, _exceptionable = true) => ("string" === typeof input.text || $guard(_exceptionable, {
|
1361
1389
|
path: _path + ".text",
|
1362
1390
|
expected: "string",
|
1363
1391
|
value: input.text
|
@@ -1367,38 +1395,40 @@ class NestiaMigrateApplication {
|
|
1367
1395
|
value: input.kind
|
1368
1396
|
}));
|
1369
1397
|
const $au0 = (input, _path, _exceptionable = true) => (() => {
|
1370
|
-
if (
|
1398
|
+
if ("null" === input.type)
|
1371
1399
|
return $ao8(input, _path, true && _exceptionable);
|
1372
|
-
else if (undefined !== input.
|
1400
|
+
else if (undefined !== input.anyOf)
|
1373
1401
|
return $ao9(input, _path, true && _exceptionable);
|
1374
|
-
else if (
|
1402
|
+
else if (undefined !== input.oneOf)
|
1375
1403
|
return $ao10(input, _path, true && _exceptionable);
|
1404
|
+
else if ("boolean" === input.type)
|
1405
|
+
return $ao11(input, _path, true && _exceptionable);
|
1376
1406
|
else if ("number" === input.type)
|
1377
|
-
return $
|
1407
|
+
return $ao13(input, _path, true && _exceptionable);
|
1378
1408
|
else if ("integer" === input.type)
|
1379
|
-
return $
|
1409
|
+
return $ao12(input, _path, true && _exceptionable);
|
1380
1410
|
else if ("string" === input.type)
|
1381
|
-
return $ao13(input, _path, true && _exceptionable);
|
1382
|
-
else if ("array" === input.type)
|
1383
1411
|
return $ao14(input, _path, true && _exceptionable);
|
1384
|
-
else if ("
|
1412
|
+
else if ("array" === input.type)
|
1385
1413
|
return $ao15(input, _path, true && _exceptionable);
|
1386
|
-
else if (
|
1414
|
+
else if ("object" === input.type)
|
1387
1415
|
return $ao16(input, _path, true && _exceptionable);
|
1416
|
+
else if (undefined !== input.$ref)
|
1417
|
+
return $ao17(input, _path, true && _exceptionable);
|
1388
1418
|
else
|
1389
1419
|
return $ao7(input, _path, true && _exceptionable);
|
1390
1420
|
})();
|
1391
1421
|
const $au1 = (input, _path, _exceptionable = true) => (() => {
|
1392
1422
|
if ("basic" === input.scheme)
|
1393
|
-
return $ao19(input, _path, true && _exceptionable);
|
1394
|
-
else if ("bearer" === input.scheme)
|
1395
1423
|
return $ao20(input, _path, true && _exceptionable);
|
1396
|
-
else if ("
|
1424
|
+
else if ("bearer" === input.scheme)
|
1397
1425
|
return $ao21(input, _path, true && _exceptionable);
|
1398
|
-
else if ("
|
1426
|
+
else if ("apiKey" === input.type)
|
1399
1427
|
return $ao22(input, _path, true && _exceptionable);
|
1400
|
-
else if ("
|
1428
|
+
else if ("openIdConnect" === input.type)
|
1401
1429
|
return $ao23(input, _path, true && _exceptionable);
|
1430
|
+
else if ("oauth2" === input.type)
|
1431
|
+
return $ao24(input, _path, true && _exceptionable);
|
1402
1432
|
else
|
1403
1433
|
return $guard(_exceptionable, {
|
1404
1434
|
path: _path,
|