@nestia/sdk 4.0.1 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/analyses/ConfigAnalyzer.js +17 -7
- package/lib/analyses/ConfigAnalyzer.js.map +1 -1
- package/lib/analyses/ExceptionAnalyzer.js +142 -0
- package/lib/analyses/ExceptionAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js +2 -2
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.js +5 -1
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.js.map +1 -1
- package/lib/executable/internal/NestiaConfigLoader.js +22 -675
- package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
- package/lib/executable/sdk.js +17 -7
- package/lib/executable/sdk.js.map +1 -1
- package/lib/generates/SwaggerGenerator.js +1 -86
- package/lib/generates/SwaggerGenerator.js.map +1 -1
- package/lib/generates/internal/SdkAliasCollection.js +1 -17
- package/lib/generates/internal/SdkAliasCollection.js.map +1 -1
- package/lib/generates/internal/SdkDistributionComposer.js +1 -56
- package/lib/generates/internal/SdkDistributionComposer.js.map +1 -1
- package/lib/index.js +17 -7
- package/lib/index.js.map +1 -1
- package/package.json +10 -10
- package/src/analyses/ReflectWebSocketOperationAnalyzer.ts +7 -4
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -36,8 +46,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
46
|
};
|
|
37
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
48
|
exports.NestiaConfigLoader = void 0;
|
|
39
|
-
const __typia_transform__assertGuard = __importStar(require("typia/lib/internal/_assertGuard.js"));
|
|
40
|
-
const __typia_transform__accessExpressionAsString = __importStar(require("typia/lib/internal/_accessExpressionAsString.js"));
|
|
41
49
|
const NoTransformConfigurationError_1 = require("@nestia/core/lib/decorators/NoTransformConfigurationError");
|
|
42
50
|
const fs_1 = __importDefault(require("fs"));
|
|
43
51
|
const path_1 = __importDefault(require("path"));
|
|
@@ -62,33 +70,9 @@ var NestiaConfigLoader;
|
|
|
62
70
|
throw new Error(`Unable to find "${file}" file.`);
|
|
63
71
|
NoTransformConfigurationError_1.NoTransformConfigurationError.throws = false;
|
|
64
72
|
const plugins = [
|
|
65
|
-
...
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
((input, _path, _exceptionable = true) => (Array.isArray(input) || __typia_transform__assertGuard._assertGuard(true, {
|
|
69
|
-
method: "typia\r\n .assert",
|
|
70
|
-
path: _path + "",
|
|
71
|
-
expected: "Array<object>",
|
|
72
|
-
value: input
|
|
73
|
-
}, _errorFactory)) && input.every((elem, _index2) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || __typia_transform__assertGuard._assertGuard(true, {
|
|
74
|
-
method: "typia\r\n .assert",
|
|
75
|
-
path: _path + "[" + _index2 + "]",
|
|
76
|
-
expected: "object",
|
|
77
|
-
value: elem
|
|
78
|
-
}, _errorFactory)) && _ao0(elem, _path + "[" + _index2 + "]", true) || __typia_transform__assertGuard._assertGuard(true, {
|
|
79
|
-
method: "typia\r\n .assert",
|
|
80
|
-
path: _path + "[" + _index2 + "]",
|
|
81
|
-
expected: "object",
|
|
82
|
-
value: elem
|
|
83
|
-
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(true, {
|
|
84
|
-
method: "typia\r\n .assert",
|
|
85
|
-
path: _path + "",
|
|
86
|
-
expected: "Array<object>",
|
|
87
|
-
value: input
|
|
88
|
-
}, _errorFactory))(input, "$input", true);
|
|
89
|
-
}
|
|
90
|
-
return input;
|
|
91
|
-
}; })()((_a = compilerOptions.plugins) !== null && _a !== void 0 ? _a : []).filter((x) => x.transform !== "@nestia/sdk/lib/transform"),
|
|
73
|
+
...typia_1.default
|
|
74
|
+
.assert((_a = compilerOptions.plugins) !== null && _a !== void 0 ? _a : [])
|
|
75
|
+
.filter((x) => x.transform !== "@nestia/sdk/lib/transform"),
|
|
92
76
|
{ transform: "@nestia/sdk/lib/transform" },
|
|
93
77
|
];
|
|
94
78
|
(0, ts_node_1.register)({
|
|
@@ -106,647 +90,10 @@ var NestiaConfigLoader;
|
|
|
106
90
|
? instance
|
|
107
91
|
: [instance];
|
|
108
92
|
try {
|
|
109
|
-
return
|
|
110
|
-
const value = input[key];
|
|
111
|
-
if (undefined === value)
|
|
112
|
-
return true;
|
|
113
|
-
return "object" === typeof value && null !== value && _io8(value);
|
|
114
|
-
}); const _io8 = input => "string" === typeof input["default"] && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "string" === typeof elem)) && (undefined === input.description || "string" === typeof input.description); const _io9 = input => Object.keys(input).every(key => {
|
|
115
|
-
const value = input[key];
|
|
116
|
-
if (undefined === value)
|
|
117
|
-
return true;
|
|
118
|
-
return "object" === typeof value && null !== value && _iu0(value);
|
|
119
|
-
}); const _io10 = input => "apiKey" === input.type && (undefined === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"]) && (undefined === input.name || "string" === typeof input.name) && (undefined === input.description || "string" === typeof input.description); const _io11 = input => "http" === input.type && "basic" === input.scheme && (undefined === input.description || "string" === typeof input.description); const _io12 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat) && (undefined === input.description || "string" === typeof input.description); const _io13 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && _io14(input.flows)) && (undefined === input.description || "string" === typeof input.description); const _io14 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && false === Array.isArray(input.authorizationCode) && _io15(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && false === Array.isArray(input.implicit) && _io17(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) && _io18(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) && _io18(input.clientCredentials)); const _io15 = input => (undefined === input.authorizationUrl || "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) && _io16(input.scopes)); const _io16 = input => Object.keys(input).every(key => {
|
|
120
|
-
const value = input[key];
|
|
121
|
-
if (undefined === value)
|
|
122
|
-
return true;
|
|
123
|
-
return "string" === typeof value;
|
|
124
|
-
}); const _io17 = input => (undefined === input.authorizationUrl || "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) && _io16(input.scopes)); const _io18 = 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) && _io16(input.scopes)); const _io19 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl && (undefined === input.description || "string" === typeof input.description); const _io20 = input => "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description); const _iu0 = input => (() => {
|
|
125
|
-
if ("apiKey" === input.type)
|
|
126
|
-
return _io10(input);
|
|
127
|
-
else if ("basic" === input.scheme)
|
|
128
|
-
return _io11(input);
|
|
129
|
-
else if ("bearer" === input.scheme)
|
|
130
|
-
return _io12(input);
|
|
131
|
-
else if ("oauth2" === input.type)
|
|
132
|
-
return _io13(input);
|
|
133
|
-
else if ("openIdConnect" === input.type)
|
|
134
|
-
return _io19(input);
|
|
135
|
-
else
|
|
136
|
-
return false;
|
|
137
|
-
})(); const _ao0 = (input, _path, _exceptionable = true) => (null !== input.input || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
138
|
-
method: "typia.assert",
|
|
139
|
-
path: _path + ".input",
|
|
140
|
-
expected: "(Array<string> | INestiaConfig.IInput | string)",
|
|
141
|
-
value: input.input
|
|
142
|
-
}, _errorFactory)) && (undefined !== input.input || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
143
|
-
method: "typia.assert",
|
|
144
|
-
path: _path + ".input",
|
|
145
|
-
expected: "(Array<string> | INestiaConfig.IInput | string)",
|
|
146
|
-
value: input.input
|
|
147
|
-
}, _errorFactory)) && ("function" === typeof input.input || "string" === typeof input.input || (Array.isArray(input.input) && input.input.every((elem, _index9) => "string" === typeof elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
148
|
-
method: "typia.assert",
|
|
149
|
-
path: _path + ".input[" + _index9 + "]",
|
|
150
|
-
expected: "string",
|
|
151
|
-
value: elem
|
|
152
|
-
}, _errorFactory)) || "object" === typeof input.input && null !== input.input && _ao1(input.input, _path + ".input", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
153
|
-
method: "typia.assert",
|
|
154
|
-
path: _path + ".input",
|
|
155
|
-
expected: "(Array<string> | INestiaConfig.IInput | string)",
|
|
156
|
-
value: input.input
|
|
157
|
-
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
158
|
-
method: "typia.assert",
|
|
159
|
-
path: _path + ".input",
|
|
160
|
-
expected: "(Array<string> | INestiaConfig.IInput | string)",
|
|
161
|
-
value: input.input
|
|
162
|
-
}, _errorFactory)) && (undefined === input.swagger || ("object" === typeof input.swagger && null !== input.swagger || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
163
|
-
method: "typia.assert",
|
|
164
|
-
path: _path + ".swagger",
|
|
165
|
-
expected: "(INestiaConfig.ISwaggerConfig | undefined)",
|
|
166
|
-
value: input.swagger
|
|
167
|
-
}, _errorFactory)) && _ao2(input.swagger, _path + ".swagger", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
168
|
-
method: "typia.assert",
|
|
169
|
-
path: _path + ".swagger",
|
|
170
|
-
expected: "(INestiaConfig.ISwaggerConfig | undefined)",
|
|
171
|
-
value: input.swagger
|
|
172
|
-
}, _errorFactory)) && (undefined === input.output || "string" === typeof input.output || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
173
|
-
method: "typia.assert",
|
|
174
|
-
path: _path + ".output",
|
|
175
|
-
expected: "(string | undefined)",
|
|
176
|
-
value: input.output
|
|
177
|
-
}, _errorFactory)) && (undefined === input.distribute || "string" === typeof input.distribute || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
178
|
-
method: "typia.assert",
|
|
179
|
-
path: _path + ".distribute",
|
|
180
|
-
expected: "(string | undefined)",
|
|
181
|
-
value: input.distribute
|
|
182
|
-
}, _errorFactory)) && (undefined === input.simulate || "boolean" === typeof input.simulate || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
183
|
-
method: "typia.assert",
|
|
184
|
-
path: _path + ".simulate",
|
|
185
|
-
expected: "(boolean | undefined)",
|
|
186
|
-
value: input.simulate
|
|
187
|
-
}, _errorFactory)) && (undefined === input.e2e || "string" === typeof input.e2e || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
188
|
-
method: "typia.assert",
|
|
189
|
-
path: _path + ".e2e",
|
|
190
|
-
expected: "(string | undefined)",
|
|
191
|
-
value: input.e2e
|
|
192
|
-
}, _errorFactory)) && (undefined === input.propagate || "boolean" === typeof input.propagate || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
193
|
-
method: "typia.assert",
|
|
194
|
-
path: _path + ".propagate",
|
|
195
|
-
expected: "(boolean | undefined)",
|
|
196
|
-
value: input.propagate
|
|
197
|
-
}, _errorFactory)) && (undefined === input.clone || "boolean" === typeof input.clone || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
198
|
-
method: "typia.assert",
|
|
199
|
-
path: _path + ".clone",
|
|
200
|
-
expected: "(boolean | undefined)",
|
|
201
|
-
value: input.clone
|
|
202
|
-
}, _errorFactory)) && (undefined === input.primitive || "boolean" === typeof input.primitive || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
203
|
-
method: "typia.assert",
|
|
204
|
-
path: _path + ".primitive",
|
|
205
|
-
expected: "(boolean | undefined)",
|
|
206
|
-
value: input.primitive
|
|
207
|
-
}, _errorFactory)) && (undefined === input.assert || "boolean" === typeof input.assert || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
208
|
-
method: "typia.assert",
|
|
209
|
-
path: _path + ".assert",
|
|
210
|
-
expected: "(boolean | undefined)",
|
|
211
|
-
value: input.assert
|
|
212
|
-
}, _errorFactory)) && (undefined === input.json || "boolean" === typeof input.json || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
213
|
-
method: "typia.assert",
|
|
214
|
-
path: _path + ".json",
|
|
215
|
-
expected: "(boolean | undefined)",
|
|
216
|
-
value: input.json
|
|
217
|
-
}, _errorFactory)); const _ao1 = (input, _path, _exceptionable = true) => ((Array.isArray(input.include) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
218
|
-
method: "typia.assert",
|
|
219
|
-
path: _path + ".include",
|
|
220
|
-
expected: "Array<string>",
|
|
221
|
-
value: input.include
|
|
222
|
-
}, _errorFactory)) && input.include.every((elem, _index10) => "string" === typeof elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
223
|
-
method: "typia.assert",
|
|
224
|
-
path: _path + ".include[" + _index10 + "]",
|
|
225
|
-
expected: "string",
|
|
226
|
-
value: elem
|
|
227
|
-
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
228
|
-
method: "typia.assert",
|
|
229
|
-
path: _path + ".include",
|
|
230
|
-
expected: "Array<string>",
|
|
231
|
-
value: input.include
|
|
232
|
-
}, _errorFactory)) && (undefined === input.exclude || (Array.isArray(input.exclude) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
233
|
-
method: "typia.assert",
|
|
234
|
-
path: _path + ".exclude",
|
|
235
|
-
expected: "(Array<string> | undefined)",
|
|
236
|
-
value: input.exclude
|
|
237
|
-
}, _errorFactory)) && input.exclude.every((elem, _index11) => "string" === typeof elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
238
|
-
method: "typia.assert",
|
|
239
|
-
path: _path + ".exclude[" + _index11 + "]",
|
|
240
|
-
expected: "string",
|
|
241
|
-
value: elem
|
|
242
|
-
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
243
|
-
method: "typia.assert",
|
|
244
|
-
path: _path + ".exclude",
|
|
245
|
-
expected: "(Array<string> | undefined)",
|
|
246
|
-
value: input.exclude
|
|
247
|
-
}, _errorFactory)); const _ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.output || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
248
|
-
method: "typia.assert",
|
|
249
|
-
path: _path + ".output",
|
|
250
|
-
expected: "string",
|
|
251
|
-
value: input.output
|
|
252
|
-
}, _errorFactory)) && (undefined === input.openapi || "2.0" === input.openapi || "3.0" === input.openapi || "3.1" === input.openapi || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
253
|
-
method: "typia.assert",
|
|
254
|
-
path: _path + ".openapi",
|
|
255
|
-
expected: "(\"2.0\" | \"3.0\" | \"3.1\" | undefined)",
|
|
256
|
-
value: input.openapi
|
|
257
|
-
}, _errorFactory)) && (undefined === input.beautify || "number" === typeof input.beautify || "boolean" === typeof input.beautify || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
258
|
-
method: "typia.assert",
|
|
259
|
-
path: _path + ".beautify",
|
|
260
|
-
expected: "(boolean | number | undefined)",
|
|
261
|
-
value: input.beautify
|
|
262
|
-
}, _errorFactory)) && (undefined === input.additional || "boolean" === typeof input.additional || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
263
|
-
method: "typia.assert",
|
|
264
|
-
path: _path + ".additional",
|
|
265
|
-
expected: "(boolean | undefined)",
|
|
266
|
-
value: input.additional
|
|
267
|
-
}, _errorFactory)) && (undefined === input.info || ("object" === typeof input.info && null !== input.info && false === Array.isArray(input.info) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
268
|
-
method: "typia.assert",
|
|
269
|
-
path: _path + ".info",
|
|
270
|
-
expected: "(Partial<OpenApi.IDocument.IInfo> | undefined)",
|
|
271
|
-
value: input.info
|
|
272
|
-
}, _errorFactory)) && _ao3(input.info, _path + ".info", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
273
|
-
method: "typia.assert",
|
|
274
|
-
path: _path + ".info",
|
|
275
|
-
expected: "(Partial<OpenApi.IDocument.IInfo> | undefined)",
|
|
276
|
-
value: input.info
|
|
277
|
-
}, _errorFactory)) && (undefined === input.servers || (Array.isArray(input.servers) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
278
|
-
method: "typia.assert",
|
|
279
|
-
path: _path + ".servers",
|
|
280
|
-
expected: "(Array<OpenApi.IServer> | undefined)",
|
|
281
|
-
value: input.servers
|
|
282
|
-
}, _errorFactory)) && input.servers.every((elem, _index12) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
283
|
-
method: "typia.assert",
|
|
284
|
-
path: _path + ".servers[" + _index12 + "]",
|
|
285
|
-
expected: "OpenApi.IServer",
|
|
286
|
-
value: elem
|
|
287
|
-
}, _errorFactory)) && _ao6(elem, _path + ".servers[" + _index12 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
288
|
-
method: "typia.assert",
|
|
289
|
-
path: _path + ".servers[" + _index12 + "]",
|
|
290
|
-
expected: "OpenApi.IServer",
|
|
291
|
-
value: elem
|
|
292
|
-
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
293
|
-
method: "typia.assert",
|
|
294
|
-
path: _path + ".servers",
|
|
295
|
-
expected: "(Array<OpenApi.IServer> | undefined)",
|
|
296
|
-
value: input.servers
|
|
297
|
-
}, _errorFactory)) && (undefined === input.security || ("object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
298
|
-
method: "typia.assert",
|
|
299
|
-
path: _path + ".security",
|
|
300
|
-
expected: "(Record<string, OpenApi.ISecurityScheme> | undefined)",
|
|
301
|
-
value: input.security
|
|
302
|
-
}, _errorFactory)) && _ao9(input.security, _path + ".security", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
303
|
-
method: "typia.assert",
|
|
304
|
-
path: _path + ".security",
|
|
305
|
-
expected: "(Record<string, OpenApi.ISecurityScheme> | undefined)",
|
|
306
|
-
value: input.security
|
|
307
|
-
}, _errorFactory)) && (undefined === input.tags || (Array.isArray(input.tags) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
308
|
-
method: "typia.assert",
|
|
309
|
-
path: _path + ".tags",
|
|
310
|
-
expected: "(Array<OpenApi.IDocument.ITag> | undefined)",
|
|
311
|
-
value: input.tags
|
|
312
|
-
}, _errorFactory)) && input.tags.every((elem, _index13) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
313
|
-
method: "typia.assert",
|
|
314
|
-
path: _path + ".tags[" + _index13 + "]",
|
|
315
|
-
expected: "OpenApi.IDocument.ITag",
|
|
316
|
-
value: elem
|
|
317
|
-
}, _errorFactory)) && _ao20(elem, _path + ".tags[" + _index13 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
318
|
-
method: "typia.assert",
|
|
319
|
-
path: _path + ".tags[" + _index13 + "]",
|
|
320
|
-
expected: "OpenApi.IDocument.ITag",
|
|
321
|
-
value: elem
|
|
322
|
-
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
323
|
-
method: "typia.assert",
|
|
324
|
-
path: _path + ".tags",
|
|
325
|
-
expected: "(Array<OpenApi.IDocument.ITag> | undefined)",
|
|
326
|
-
value: input.tags
|
|
327
|
-
}, _errorFactory)) && (undefined === input.decompose || "boolean" === typeof input.decompose || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
328
|
-
method: "typia.assert",
|
|
329
|
-
path: _path + ".decompose",
|
|
330
|
-
expected: "(boolean | undefined)",
|
|
331
|
-
value: input.decompose
|
|
332
|
-
}, _errorFactory)); const _ao3 = (input, _path, _exceptionable = true) => (undefined === input.title || "string" === typeof input.title || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
333
|
-
method: "typia.assert",
|
|
334
|
-
path: _path + ".title",
|
|
335
|
-
expected: "(string | undefined)",
|
|
336
|
-
value: input.title
|
|
337
|
-
}, _errorFactory)) && (undefined === input.summary || "string" === typeof input.summary || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
338
|
-
method: "typia.assert",
|
|
339
|
-
path: _path + ".summary",
|
|
340
|
-
expected: "(string | undefined)",
|
|
341
|
-
value: input.summary
|
|
342
|
-
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
343
|
-
method: "typia.assert",
|
|
344
|
-
path: _path + ".description",
|
|
345
|
-
expected: "(string | undefined)",
|
|
346
|
-
value: input.description
|
|
347
|
-
}, _errorFactory)) && (undefined === input.termsOfService || "string" === typeof input.termsOfService || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
348
|
-
method: "typia.assert",
|
|
349
|
-
path: _path + ".termsOfService",
|
|
350
|
-
expected: "(string | undefined)",
|
|
351
|
-
value: input.termsOfService
|
|
352
|
-
}, _errorFactory)) && (undefined === input.contact || ("object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
353
|
-
method: "typia.assert",
|
|
354
|
-
path: _path + ".contact",
|
|
355
|
-
expected: "(OpenApi.IDocument.IContact | undefined)",
|
|
356
|
-
value: input.contact
|
|
357
|
-
}, _errorFactory)) && _ao4(input.contact, _path + ".contact", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
358
|
-
method: "typia.assert",
|
|
359
|
-
path: _path + ".contact",
|
|
360
|
-
expected: "(OpenApi.IDocument.IContact | undefined)",
|
|
361
|
-
value: input.contact
|
|
362
|
-
}, _errorFactory)) && (undefined === input.license || ("object" === typeof input.license && null !== input.license || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
363
|
-
method: "typia.assert",
|
|
364
|
-
path: _path + ".license",
|
|
365
|
-
expected: "(OpenApi.IDocument.ILicense | undefined)",
|
|
366
|
-
value: input.license
|
|
367
|
-
}, _errorFactory)) && _ao5(input.license, _path + ".license", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
368
|
-
method: "typia.assert",
|
|
369
|
-
path: _path + ".license",
|
|
370
|
-
expected: "(OpenApi.IDocument.ILicense | undefined)",
|
|
371
|
-
value: input.license
|
|
372
|
-
}, _errorFactory)) && (undefined === input.version || "string" === typeof input.version || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
373
|
-
method: "typia.assert",
|
|
374
|
-
path: _path + ".version",
|
|
375
|
-
expected: "(string | undefined)",
|
|
376
|
-
value: input.version
|
|
377
|
-
}, _errorFactory)); const _ao4 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
378
|
-
method: "typia.assert",
|
|
379
|
-
path: _path + ".name",
|
|
380
|
-
expected: "(string | undefined)",
|
|
381
|
-
value: input.name
|
|
382
|
-
}, _errorFactory)) && (undefined === input.url || "string" === typeof input.url || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
383
|
-
method: "typia.assert",
|
|
384
|
-
path: _path + ".url",
|
|
385
|
-
expected: "(string | undefined)",
|
|
386
|
-
value: input.url
|
|
387
|
-
}, _errorFactory)) && (undefined === input.email || "string" === typeof input.email && (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(input.email) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
388
|
-
method: "typia.assert",
|
|
389
|
-
path: _path + ".email",
|
|
390
|
-
expected: "string & Format<\"email\">",
|
|
391
|
-
value: input.email
|
|
392
|
-
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
393
|
-
method: "typia.assert",
|
|
394
|
-
path: _path + ".email",
|
|
395
|
-
expected: "((string & Format<\"email\">) | undefined)",
|
|
396
|
-
value: input.email
|
|
397
|
-
}, _errorFactory)); const _ao5 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
398
|
-
method: "typia.assert",
|
|
399
|
-
path: _path + ".name",
|
|
400
|
-
expected: "string",
|
|
401
|
-
value: input.name
|
|
402
|
-
}, _errorFactory)) && (undefined === input.identifier || "string" === typeof input.identifier || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
403
|
-
method: "typia.assert",
|
|
404
|
-
path: _path + ".identifier",
|
|
405
|
-
expected: "(string | undefined)",
|
|
406
|
-
value: input.identifier
|
|
407
|
-
}, _errorFactory)) && (undefined === input.url || "string" === typeof input.url || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
408
|
-
method: "typia.assert",
|
|
409
|
-
path: _path + ".url",
|
|
410
|
-
expected: "(string | undefined)",
|
|
411
|
-
value: input.url
|
|
412
|
-
}, _errorFactory)); const _ao6 = (input, _path, _exceptionable = true) => ("string" === typeof input.url || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
413
|
-
method: "typia.assert",
|
|
414
|
-
path: _path + ".url",
|
|
415
|
-
expected: "string",
|
|
416
|
-
value: input.url
|
|
417
|
-
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
418
|
-
method: "typia.assert",
|
|
419
|
-
path: _path + ".description",
|
|
420
|
-
expected: "(string | undefined)",
|
|
421
|
-
value: input.description
|
|
422
|
-
}, _errorFactory)) && (undefined === input.variables || ("object" === typeof input.variables && null !== input.variables && false === Array.isArray(input.variables) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
423
|
-
method: "typia.assert",
|
|
424
|
-
path: _path + ".variables",
|
|
425
|
-
expected: "(Record<string, OpenApi.IServer.IVariable> | undefined)",
|
|
426
|
-
value: input.variables
|
|
427
|
-
}, _errorFactory)) && _ao7(input.variables, _path + ".variables", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
428
|
-
method: "typia.assert",
|
|
429
|
-
path: _path + ".variables",
|
|
430
|
-
expected: "(Record<string, OpenApi.IServer.IVariable> | undefined)",
|
|
431
|
-
value: input.variables
|
|
432
|
-
}, _errorFactory)); const _ao7 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
433
|
-
const value = input[key];
|
|
434
|
-
if (undefined === value)
|
|
435
|
-
return true;
|
|
436
|
-
return ("object" === typeof value && null !== value || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
437
|
-
method: "typia.assert",
|
|
438
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
439
|
-
expected: "OpenApi.IServer.IVariable",
|
|
440
|
-
value: value
|
|
441
|
-
}, _errorFactory)) && _ao8(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
442
|
-
method: "typia.assert",
|
|
443
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
444
|
-
expected: "OpenApi.IServer.IVariable",
|
|
445
|
-
value: value
|
|
446
|
-
}, _errorFactory);
|
|
447
|
-
}); const _ao8 = (input, _path, _exceptionable = true) => ("string" === typeof input["default"] || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
448
|
-
method: "typia.assert",
|
|
449
|
-
path: _path + "[\"default\"]",
|
|
450
|
-
expected: "string",
|
|
451
|
-
value: input["default"]
|
|
452
|
-
}, _errorFactory)) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
453
|
-
method: "typia.assert",
|
|
454
|
-
path: _path + "[\"enum\"]",
|
|
455
|
-
expected: "(Array<string> | undefined)",
|
|
456
|
-
value: input["enum"]
|
|
457
|
-
}, _errorFactory)) && input["enum"].every((elem, _index14) => "string" === typeof elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
458
|
-
method: "typia.assert",
|
|
459
|
-
path: _path + "[\"enum\"][" + _index14 + "]",
|
|
460
|
-
expected: "string",
|
|
461
|
-
value: elem
|
|
462
|
-
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
463
|
-
method: "typia.assert",
|
|
464
|
-
path: _path + "[\"enum\"]",
|
|
465
|
-
expected: "(Array<string> | undefined)",
|
|
466
|
-
value: input["enum"]
|
|
467
|
-
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
468
|
-
method: "typia.assert",
|
|
469
|
-
path: _path + ".description",
|
|
470
|
-
expected: "(string | undefined)",
|
|
471
|
-
value: input.description
|
|
472
|
-
}, _errorFactory)); const _ao9 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
473
|
-
const value = input[key];
|
|
474
|
-
if (undefined === value)
|
|
475
|
-
return true;
|
|
476
|
-
return ("object" === typeof value && null !== value || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
477
|
-
method: "typia.assert",
|
|
478
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
479
|
-
expected: "(OpenApi.ISecurityScheme.IApiKey | OpenApi.ISecurityScheme.IHttpBasic | OpenApi.ISecurityScheme.IHttpBearer | OpenApi.ISecurityScheme.IOAuth2 | OpenApi.ISecurityScheme.IOpenId)",
|
|
480
|
-
value: value
|
|
481
|
-
}, _errorFactory)) && _au0(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
482
|
-
method: "typia.assert",
|
|
483
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
484
|
-
expected: "(OpenApi.ISecurityScheme.IApiKey | OpenApi.ISecurityScheme.IHttpBasic | OpenApi.ISecurityScheme.IHttpBearer | OpenApi.ISecurityScheme.IOAuth2 | OpenApi.ISecurityScheme.IOpenId)",
|
|
485
|
-
value: value
|
|
486
|
-
}, _errorFactory);
|
|
487
|
-
}); const _ao10 = (input, _path, _exceptionable = true) => ("apiKey" === input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
488
|
-
method: "typia.assert",
|
|
489
|
-
path: _path + ".type",
|
|
490
|
-
expected: "\"apiKey\"",
|
|
491
|
-
value: input.type
|
|
492
|
-
}, _errorFactory)) && (undefined === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
493
|
-
method: "typia.assert",
|
|
494
|
-
path: _path + "[\"in\"]",
|
|
495
|
-
expected: "(\"cookie\" | \"header\" | \"query\" | undefined)",
|
|
496
|
-
value: input["in"]
|
|
497
|
-
}, _errorFactory)) && (undefined === input.name || "string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
498
|
-
method: "typia.assert",
|
|
499
|
-
path: _path + ".name",
|
|
500
|
-
expected: "(string | undefined)",
|
|
501
|
-
value: input.name
|
|
502
|
-
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
503
|
-
method: "typia.assert",
|
|
504
|
-
path: _path + ".description",
|
|
505
|
-
expected: "(string | undefined)",
|
|
506
|
-
value: input.description
|
|
507
|
-
}, _errorFactory)); const _ao11 = (input, _path, _exceptionable = true) => ("http" === input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
508
|
-
method: "typia.assert",
|
|
509
|
-
path: _path + ".type",
|
|
510
|
-
expected: "\"http\"",
|
|
511
|
-
value: input.type
|
|
512
|
-
}, _errorFactory)) && ("basic" === input.scheme || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
513
|
-
method: "typia.assert",
|
|
514
|
-
path: _path + ".scheme",
|
|
515
|
-
expected: "\"basic\"",
|
|
516
|
-
value: input.scheme
|
|
517
|
-
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
518
|
-
method: "typia.assert",
|
|
519
|
-
path: _path + ".description",
|
|
520
|
-
expected: "(string | undefined)",
|
|
521
|
-
value: input.description
|
|
522
|
-
}, _errorFactory)); const _ao12 = (input, _path, _exceptionable = true) => ("http" === input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
523
|
-
method: "typia.assert",
|
|
524
|
-
path: _path + ".type",
|
|
525
|
-
expected: "\"http\"",
|
|
526
|
-
value: input.type
|
|
527
|
-
}, _errorFactory)) && ("bearer" === input.scheme || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
528
|
-
method: "typia.assert",
|
|
529
|
-
path: _path + ".scheme",
|
|
530
|
-
expected: "\"bearer\"",
|
|
531
|
-
value: input.scheme
|
|
532
|
-
}, _errorFactory)) && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
533
|
-
method: "typia.assert",
|
|
534
|
-
path: _path + ".bearerFormat",
|
|
535
|
-
expected: "(string | undefined)",
|
|
536
|
-
value: input.bearerFormat
|
|
537
|
-
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
538
|
-
method: "typia.assert",
|
|
539
|
-
path: _path + ".description",
|
|
540
|
-
expected: "(string | undefined)",
|
|
541
|
-
value: input.description
|
|
542
|
-
}, _errorFactory)); const _ao13 = (input, _path, _exceptionable = true) => ("oauth2" === input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
543
|
-
method: "typia.assert",
|
|
544
|
-
path: _path + ".type",
|
|
545
|
-
expected: "\"oauth2\"",
|
|
546
|
-
value: input.type
|
|
547
|
-
}, _errorFactory)) && (("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
548
|
-
method: "typia.assert",
|
|
549
|
-
path: _path + ".flows",
|
|
550
|
-
expected: "OpenApi.ISecurityScheme.IOAuth2.IFlowSet",
|
|
551
|
-
value: input.flows
|
|
552
|
-
}, _errorFactory)) && _ao14(input.flows, _path + ".flows", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
553
|
-
method: "typia.assert",
|
|
554
|
-
path: _path + ".flows",
|
|
555
|
-
expected: "OpenApi.ISecurityScheme.IOAuth2.IFlowSet",
|
|
556
|
-
value: input.flows
|
|
557
|
-
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
558
|
-
method: "typia.assert",
|
|
559
|
-
path: _path + ".description",
|
|
560
|
-
expected: "(string | undefined)",
|
|
561
|
-
value: input.description
|
|
562
|
-
}, _errorFactory)); const _ao14 = (input, _path, _exceptionable = true) => (undefined === input.authorizationCode || ("object" === typeof input.authorizationCode && null !== input.authorizationCode && false === Array.isArray(input.authorizationCode) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
563
|
-
method: "typia.assert",
|
|
564
|
-
path: _path + ".authorizationCode",
|
|
565
|
-
expected: "(OpenApi.ISecurityScheme.IOAuth2.IFlow | undefined)",
|
|
566
|
-
value: input.authorizationCode
|
|
567
|
-
}, _errorFactory)) && _ao15(input.authorizationCode, _path + ".authorizationCode", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
568
|
-
method: "typia.assert",
|
|
569
|
-
path: _path + ".authorizationCode",
|
|
570
|
-
expected: "(OpenApi.ISecurityScheme.IOAuth2.IFlow | undefined)",
|
|
571
|
-
value: input.authorizationCode
|
|
572
|
-
}, _errorFactory)) && (undefined === input.implicit || ("object" === typeof input.implicit && null !== input.implicit && false === Array.isArray(input.implicit) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
573
|
-
method: "typia.assert",
|
|
574
|
-
path: _path + ".implicit",
|
|
575
|
-
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
|
576
|
-
value: input.implicit
|
|
577
|
-
}, _errorFactory)) && _ao17(input.implicit, _path + ".implicit", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
578
|
-
method: "typia.assert",
|
|
579
|
-
path: _path + ".implicit",
|
|
580
|
-
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
|
581
|
-
value: input.implicit
|
|
582
|
-
}, _errorFactory)) && (undefined === input.password || ("object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
583
|
-
method: "typia.assert",
|
|
584
|
-
path: _path + ".password",
|
|
585
|
-
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
586
|
-
value: input.password
|
|
587
|
-
}, _errorFactory)) && _ao18(input.password, _path + ".password", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
588
|
-
method: "typia.assert",
|
|
589
|
-
path: _path + ".password",
|
|
590
|
-
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
591
|
-
value: input.password
|
|
592
|
-
}, _errorFactory)) && (undefined === input.clientCredentials || ("object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
593
|
-
method: "typia.assert",
|
|
594
|
-
path: _path + ".clientCredentials",
|
|
595
|
-
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
596
|
-
value: input.clientCredentials
|
|
597
|
-
}, _errorFactory)) && _ao18(input.clientCredentials, _path + ".clientCredentials", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
598
|
-
method: "typia.assert",
|
|
599
|
-
path: _path + ".clientCredentials",
|
|
600
|
-
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
601
|
-
value: input.clientCredentials
|
|
602
|
-
}, _errorFactory)); const _ao15 = (input, _path, _exceptionable = true) => (undefined === input.authorizationUrl || "string" === typeof input.authorizationUrl || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
603
|
-
method: "typia.assert",
|
|
604
|
-
path: _path + ".authorizationUrl",
|
|
605
|
-
expected: "(string | undefined)",
|
|
606
|
-
value: input.authorizationUrl
|
|
607
|
-
}, _errorFactory)) && (undefined === input.tokenUrl || "string" === typeof input.tokenUrl || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
608
|
-
method: "typia.assert",
|
|
609
|
-
path: _path + ".tokenUrl",
|
|
610
|
-
expected: "(string | undefined)",
|
|
611
|
-
value: input.tokenUrl
|
|
612
|
-
}, _errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
613
|
-
method: "typia.assert",
|
|
614
|
-
path: _path + ".refreshUrl",
|
|
615
|
-
expected: "(string | undefined)",
|
|
616
|
-
value: input.refreshUrl
|
|
617
|
-
}, _errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
618
|
-
method: "typia.assert",
|
|
619
|
-
path: _path + ".scopes",
|
|
620
|
-
expected: "(Record<string, string> | undefined)",
|
|
621
|
-
value: input.scopes
|
|
622
|
-
}, _errorFactory)) && _ao16(input.scopes, _path + ".scopes", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
623
|
-
method: "typia.assert",
|
|
624
|
-
path: _path + ".scopes",
|
|
625
|
-
expected: "(Record<string, string> | undefined)",
|
|
626
|
-
value: input.scopes
|
|
627
|
-
}, _errorFactory)); const _ao16 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
628
|
-
const value = input[key];
|
|
629
|
-
if (undefined === value)
|
|
630
|
-
return true;
|
|
631
|
-
return "string" === typeof value || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
632
|
-
method: "typia.assert",
|
|
633
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
634
|
-
expected: "string",
|
|
635
|
-
value: value
|
|
636
|
-
}, _errorFactory);
|
|
637
|
-
}); const _ao17 = (input, _path, _exceptionable = true) => (undefined === input.authorizationUrl || "string" === typeof input.authorizationUrl || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
638
|
-
method: "typia.assert",
|
|
639
|
-
path: _path + ".authorizationUrl",
|
|
640
|
-
expected: "(string | undefined)",
|
|
641
|
-
value: input.authorizationUrl
|
|
642
|
-
}, _errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
643
|
-
method: "typia.assert",
|
|
644
|
-
path: _path + ".refreshUrl",
|
|
645
|
-
expected: "(string | undefined)",
|
|
646
|
-
value: input.refreshUrl
|
|
647
|
-
}, _errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
648
|
-
method: "typia.assert",
|
|
649
|
-
path: _path + ".scopes",
|
|
650
|
-
expected: "(Record<string, string> | undefined)",
|
|
651
|
-
value: input.scopes
|
|
652
|
-
}, _errorFactory)) && _ao16(input.scopes, _path + ".scopes", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
653
|
-
method: "typia.assert",
|
|
654
|
-
path: _path + ".scopes",
|
|
655
|
-
expected: "(Record<string, string> | undefined)",
|
|
656
|
-
value: input.scopes
|
|
657
|
-
}, _errorFactory)); const _ao18 = (input, _path, _exceptionable = true) => (undefined === input.tokenUrl || "string" === typeof input.tokenUrl || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
658
|
-
method: "typia.assert",
|
|
659
|
-
path: _path + ".tokenUrl",
|
|
660
|
-
expected: "(string | undefined)",
|
|
661
|
-
value: input.tokenUrl
|
|
662
|
-
}, _errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
663
|
-
method: "typia.assert",
|
|
664
|
-
path: _path + ".refreshUrl",
|
|
665
|
-
expected: "(string | undefined)",
|
|
666
|
-
value: input.refreshUrl
|
|
667
|
-
}, _errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
668
|
-
method: "typia.assert",
|
|
669
|
-
path: _path + ".scopes",
|
|
670
|
-
expected: "(Record<string, string> | undefined)",
|
|
671
|
-
value: input.scopes
|
|
672
|
-
}, _errorFactory)) && _ao16(input.scopes, _path + ".scopes", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
673
|
-
method: "typia.assert",
|
|
674
|
-
path: _path + ".scopes",
|
|
675
|
-
expected: "(Record<string, string> | undefined)",
|
|
676
|
-
value: input.scopes
|
|
677
|
-
}, _errorFactory)); const _ao19 = (input, _path, _exceptionable = true) => ("openIdConnect" === input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
678
|
-
method: "typia.assert",
|
|
679
|
-
path: _path + ".type",
|
|
680
|
-
expected: "\"openIdConnect\"",
|
|
681
|
-
value: input.type
|
|
682
|
-
}, _errorFactory)) && ("string" === typeof input.openIdConnectUrl || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
683
|
-
method: "typia.assert",
|
|
684
|
-
path: _path + ".openIdConnectUrl",
|
|
685
|
-
expected: "string",
|
|
686
|
-
value: input.openIdConnectUrl
|
|
687
|
-
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
688
|
-
method: "typia.assert",
|
|
689
|
-
path: _path + ".description",
|
|
690
|
-
expected: "(string | undefined)",
|
|
691
|
-
value: input.description
|
|
692
|
-
}, _errorFactory)); const _ao20 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
693
|
-
method: "typia.assert",
|
|
694
|
-
path: _path + ".name",
|
|
695
|
-
expected: "string",
|
|
696
|
-
value: input.name
|
|
697
|
-
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
698
|
-
method: "typia.assert",
|
|
699
|
-
path: _path + ".description",
|
|
700
|
-
expected: "(string | undefined)",
|
|
701
|
-
value: input.description
|
|
702
|
-
}, _errorFactory)); const _au0 = (input, _path, _exceptionable = true) => (() => {
|
|
703
|
-
if ("apiKey" === input.type)
|
|
704
|
-
return _ao10(input, _path, true && _exceptionable);
|
|
705
|
-
else if ("basic" === input.scheme)
|
|
706
|
-
return _ao11(input, _path, true && _exceptionable);
|
|
707
|
-
else if ("bearer" === input.scheme)
|
|
708
|
-
return _ao12(input, _path, true && _exceptionable);
|
|
709
|
-
else if ("oauth2" === input.type)
|
|
710
|
-
return _ao13(input, _path, true && _exceptionable);
|
|
711
|
-
else if ("openIdConnect" === input.type)
|
|
712
|
-
return _ao19(input, _path, true && _exceptionable);
|
|
713
|
-
else
|
|
714
|
-
return __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
715
|
-
method: "typia.assert",
|
|
716
|
-
path: _path,
|
|
717
|
-
expected: "(OpenApi.ISecurityScheme.IApiKey | OpenApi.ISecurityScheme.IHttpBasic | OpenApi.ISecurityScheme.IHttpBearer | OpenApi.ISecurityScheme.IOAuth2 | OpenApi.ISecurityScheme.IOpenId)",
|
|
718
|
-
value: input
|
|
719
|
-
}, _errorFactory);
|
|
720
|
-
})(); const __is = input => Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && _io0(elem)); let _errorFactory; return (input, errorFactory) => {
|
|
721
|
-
if (false === __is(input)) {
|
|
722
|
-
_errorFactory = errorFactory;
|
|
723
|
-
((input, _path, _exceptionable = true) => (Array.isArray(input) || __typia_transform__assertGuard._assertGuard(true, {
|
|
724
|
-
method: "typia.assert",
|
|
725
|
-
path: _path + "",
|
|
726
|
-
expected: "Array<INestiaConfig>",
|
|
727
|
-
value: input
|
|
728
|
-
}, _errorFactory)) && input.every((elem, _index8) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(true, {
|
|
729
|
-
method: "typia.assert",
|
|
730
|
-
path: _path + "[" + _index8 + "]",
|
|
731
|
-
expected: "INestiaConfig",
|
|
732
|
-
value: elem
|
|
733
|
-
}, _errorFactory)) && _ao0(elem, _path + "[" + _index8 + "]", true) || __typia_transform__assertGuard._assertGuard(true, {
|
|
734
|
-
method: "typia.assert",
|
|
735
|
-
path: _path + "[" + _index8 + "]",
|
|
736
|
-
expected: "INestiaConfig",
|
|
737
|
-
value: elem
|
|
738
|
-
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(true, {
|
|
739
|
-
method: "typia.assert",
|
|
740
|
-
path: _path + "",
|
|
741
|
-
expected: "Array<INestiaConfig>",
|
|
742
|
-
value: input
|
|
743
|
-
}, _errorFactory))(input, "$input", true);
|
|
744
|
-
}
|
|
745
|
-
return input;
|
|
746
|
-
}; })()(configurations);
|
|
93
|
+
return typia_1.default.assert(configurations);
|
|
747
94
|
}
|
|
748
95
|
catch (exp) {
|
|
749
|
-
if (
|
|
96
|
+
if (typia_1.default.is(exp))
|
|
750
97
|
exp.message = `invalid "${file}" data.`;
|
|
751
98
|
throw exp;
|
|
752
99
|
}
|