@nestia/sdk 2.6.4 → 3.0.0-dev.20240412
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/INestiaConfig.d.ts +5 -8
- package/lib/analyses/ExceptionAnalyzer.js +2 -2
- package/lib/analyses/ExceptionAnalyzer.js.map +1 -1
- package/lib/analyses/PathAnalyzer.d.ts +0 -2
- package/lib/executable/internal/NestiaConfigLoader.js +190 -132
- package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
- package/lib/generates/SwaggerGenerator.d.ts +2 -2
- package/lib/generates/SwaggerGenerator.js +15 -15
- package/lib/generates/SwaggerGenerator.js.map +1 -1
- package/lib/generates/internal/SdkAliasCollection.js +1 -1
- package/lib/generates/internal/SdkFunctionProgrammer.js +2 -2
- package/lib/generates/internal/SdkNamespaceProgrammer.js +2 -2
- package/lib/generates/internal/SdkTypeProgrammer.js +10 -10
- package/lib/generates/internal/SdkTypeProgrammer.js.map +1 -1
- package/lib/generates/internal/SwaggerSchemaGenerator.d.ts +4 -4
- package/lib/generates/internal/SwaggerSchemaGenerator.js +3 -3
- package/lib/generates/internal/SwaggerSchemaGenerator.js.map +1 -1
- package/lib/structures/ISwaggerLazyProperty.d.ts +2 -2
- package/lib/structures/ISwaggerLazySchema.d.ts +2 -2
- package/package.json +6 -5
- package/src/INestiaConfig.ts +258 -261
- package/src/analyses/ExceptionAnalyzer.ts +2 -2
- package/src/generates/SwaggerGenerator.ts +35 -38
- package/src/generates/internal/SdkTypeProgrammer.ts +12 -11
- package/src/generates/internal/SwaggerSchemaGenerator.ts +22 -23
- package/src/structures/ISwaggerError.ts +8 -8
- package/src/structures/ISwaggerLazyProperty.ts +7 -7
- package/src/structures/ISwaggerLazySchema.ts +7 -7
- package/lib/structures/ISwagger.d.ts +0 -49
- package/lib/structures/ISwagger.js +0 -3
- package/lib/structures/ISwagger.js.map +0 -1
- package/lib/structures/ISwaggerComponents.d.ts +0 -26
- package/lib/structures/ISwaggerComponents.js +0 -3
- package/lib/structures/ISwaggerComponents.js.map +0 -1
- package/lib/structures/ISwaggerInfo.d.ts +0 -71
- package/lib/structures/ISwaggerInfo.js +0 -3
- package/lib/structures/ISwaggerInfo.js.map +0 -1
- package/lib/structures/ISwaggerRoute.d.ts +0 -50
- package/lib/structures/ISwaggerRoute.js +0 -3
- package/lib/structures/ISwaggerRoute.js.map +0 -1
- package/lib/structures/ISwaggerSecurityScheme.d.ts +0 -56
- package/lib/structures/ISwaggerSecurityScheme.js +0 -3
- package/lib/structures/ISwaggerSecurityScheme.js.map +0 -1
- package/lib/structures/ISwaggerServer.d.ts +0 -15
- package/lib/structures/ISwaggerServer.js +0 -3
- package/lib/structures/ISwaggerServer.js.map +0 -1
- package/lib/structures/ISwaggerTag.d.ts +0 -9
- package/lib/structures/ISwaggerTag.js +0 -3
- package/lib/structures/ISwaggerTag.js.map +0 -1
- package/src/structures/ISwagger.ts +0 -66
- package/src/structures/ISwaggerComponents.ts +0 -29
- package/src/structures/ISwaggerInfo.ts +0 -80
- package/src/structures/ISwaggerRoute.ts +0 -54
- package/src/structures/ISwaggerSecurityScheme.ts +0 -65
- package/src/structures/ISwaggerServer.ts +0 -16
- package/src/structures/ISwaggerTag.ts +0 -9
|
@@ -83,44 +83,51 @@ var NestiaConfigLoader;
|
|
|
83
83
|
const __is = input => {
|
|
84
84
|
const $io0 = input => null !== input.input && undefined !== input.input && ("function" === typeof input.input || "string" === typeof input.input || (Array.isArray(input.input) && input.input.every(elem => "string" === typeof elem) || "object" === typeof input.input && null !== input.input && $io1(input.input))) && (undefined === input.swagger || "object" === typeof input.swagger && null !== input.swagger && $io2(input.swagger)) && (undefined === input.output || "string" === typeof input.output) && (undefined === input.distribute || "string" === typeof input.distribute) && (undefined === input.simulate || "boolean" === typeof input.simulate) && (undefined === input.e2e || "string" === typeof input.e2e) && (undefined === input.propagate || "boolean" === typeof input.propagate) && (undefined === input.clone || "boolean" === typeof input.clone) && (undefined === input.primitive || "boolean" === typeof input.primitive) && (undefined === input.assert || "boolean" === typeof input.assert) && (undefined === input.json || "boolean" === typeof input.json);
|
|
85
85
|
const $io1 = input => Array.isArray(input.include) && input.include.every(elem => "string" === typeof elem) && (undefined === input.exclude || Array.isArray(input.exclude) && input.exclude.every(elem => "string" === typeof elem));
|
|
86
|
-
const $io2 = input => "string" === typeof input.output && (undefined === input.beautify || "number" === typeof input.beautify || "boolean" === typeof input.beautify) && (undefined === input.additional || "boolean" === typeof input.additional) && (undefined === input.info || "object" === typeof input.info && null !== input.info && false === Array.isArray(input.info) && $io3(input.info)) && (undefined === input.servers || Array.isArray(input.servers) && input.servers.every(elem => "object" === typeof elem && null !== elem && $io6(elem))) && (undefined === input.security || "object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) && $
|
|
87
|
-
const $io3 = input => (undefined === input.title || "string" === typeof input.title) && (undefined === input.
|
|
88
|
-
const $io4 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.url || "string" === typeof input.url
|
|
89
|
-
const $io5 = input => "string" === typeof input.name && (undefined === input.
|
|
90
|
-
const $io6 = input => "string" === typeof input.url && (
|
|
86
|
+
const $io2 = input => "string" === typeof input.output && (undefined === input.beautify || "number" === typeof input.beautify || "boolean" === typeof input.beautify) && (undefined === input.additional || "boolean" === typeof input.additional) && (undefined === input.info || "object" === typeof input.info && null !== input.info && false === Array.isArray(input.info) && $io3(input.info)) && (undefined === input.servers || Array.isArray(input.servers) && input.servers.every(elem => "object" === typeof elem && null !== elem && $io6(elem))) && (undefined === input.security || "object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) && $io9(input.security)) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "object" === typeof elem && null !== elem && $io20(elem))) && (undefined === input.decompose || "boolean" === typeof input.decompose);
|
|
87
|
+
const $io3 = input => (undefined === input.title || "string" === typeof input.title) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.termsOfService || "string" === typeof input.termsOfService) && (undefined === input.contact || "object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) && $io4(input.contact)) && (undefined === input.license || "object" === typeof input.license && null !== input.license && $io5(input.license)) && (undefined === input.version || "string" === typeof input.version);
|
|
88
|
+
const $io4 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.url || "string" === typeof input.url) && (undefined === input.email || "string" === typeof input.email);
|
|
89
|
+
const $io5 = input => "string" === typeof input.name && (undefined === input.identifier || "string" === typeof input.identifier) && (undefined === input.url || "string" === typeof input.url);
|
|
90
|
+
const $io6 = input => "string" === typeof input.url && (undefined === input.description || "string" === typeof input.description) && (undefined === input.variables || "object" === typeof input.variables && null !== input.variables && false === Array.isArray(input.variables) && $io7(input.variables));
|
|
91
91
|
const $io7 = input => Object.keys(input).every(key => {
|
|
92
|
+
const value = input[key];
|
|
93
|
+
if (undefined === value)
|
|
94
|
+
return true;
|
|
95
|
+
return "object" === typeof value && null !== value && $io8(value);
|
|
96
|
+
});
|
|
97
|
+
const $io8 = input => "string" === typeof input["default"] && (undefined === input["enum"] || Array.isArray(input["enum"]) && (1 <= input["enum"].length && input["enum"].every(elem => "string" === typeof elem))) && (undefined === input.description || "string" === typeof input.description);
|
|
98
|
+
const $io9 = input => Object.keys(input).every(key => {
|
|
92
99
|
const value = input[key];
|
|
93
100
|
if (undefined === value)
|
|
94
101
|
return true;
|
|
95
102
|
return "object" === typeof value && null !== value && $iu0(value);
|
|
96
103
|
});
|
|
97
|
-
const $
|
|
98
|
-
const $
|
|
99
|
-
const $
|
|
100
|
-
const $
|
|
101
|
-
const $
|
|
102
|
-
const $
|
|
103
|
-
const $
|
|
104
|
-
const $io15 = input => Object.keys(input).every(key => {
|
|
104
|
+
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);
|
|
105
|
+
const $io11 = input => "http" === input.type && "basic" === input.scheme && (undefined === input.description || "string" === typeof input.description);
|
|
106
|
+
const $io12 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat) && (undefined === input.description || "string" === typeof input.description);
|
|
107
|
+
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);
|
|
108
|
+
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));
|
|
109
|
+
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));
|
|
110
|
+
const $io16 = input => Object.keys(input).every(key => {
|
|
105
111
|
const value = input[key];
|
|
106
112
|
if (undefined === value)
|
|
107
113
|
return true;
|
|
108
114
|
return "string" === typeof value;
|
|
109
115
|
});
|
|
110
|
-
const $
|
|
111
|
-
const $
|
|
112
|
-
const $
|
|
116
|
+
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));
|
|
117
|
+
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));
|
|
118
|
+
const $io19 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl && (undefined === input.description || "string" === typeof input.description);
|
|
119
|
+
const $io20 = input => "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description);
|
|
113
120
|
const $iu0 = input => (() => {
|
|
114
|
-
if ("
|
|
115
|
-
return $io8(input);
|
|
116
|
-
else if ("bearer" === input.scheme)
|
|
117
|
-
return $io9(input);
|
|
118
|
-
else if ("apiKey" === input.type)
|
|
121
|
+
if ("apiKey" === input.type)
|
|
119
122
|
return $io10(input);
|
|
120
|
-
else if ("
|
|
123
|
+
else if ("basic" === input.scheme)
|
|
121
124
|
return $io11(input);
|
|
122
|
-
else if ("
|
|
125
|
+
else if ("bearer" === input.scheme)
|
|
123
126
|
return $io12(input);
|
|
127
|
+
else if ("oauth2" === input.type)
|
|
128
|
+
return $io13(input);
|
|
129
|
+
else if ("openIdConnect" === input.type)
|
|
130
|
+
return $io19(input);
|
|
124
131
|
else
|
|
125
132
|
return false;
|
|
126
133
|
})();
|
|
@@ -234,51 +241,51 @@ var NestiaConfigLoader;
|
|
|
234
241
|
value: input.additional
|
|
235
242
|
}, errorFactory)) && (undefined === input.info || ("object" === typeof input.info && null !== input.info && false === Array.isArray(input.info) || $guard(_exceptionable, {
|
|
236
243
|
path: _path + ".info",
|
|
237
|
-
expected: "(Partial<
|
|
244
|
+
expected: "(Partial<OpenApi.IDocument.IInfo> | undefined)",
|
|
238
245
|
value: input.info
|
|
239
246
|
}, errorFactory)) && $ao3(input.info, _path + ".info", true && _exceptionable) || $guard(_exceptionable, {
|
|
240
247
|
path: _path + ".info",
|
|
241
|
-
expected: "(Partial<
|
|
248
|
+
expected: "(Partial<OpenApi.IDocument.IInfo> | undefined)",
|
|
242
249
|
value: input.info
|
|
243
250
|
}, errorFactory)) && (undefined === input.servers || (Array.isArray(input.servers) || $guard(_exceptionable, {
|
|
244
251
|
path: _path + ".servers",
|
|
245
|
-
expected: "(Array<
|
|
252
|
+
expected: "(Array<OpenApi.IServer> | undefined)",
|
|
246
253
|
value: input.servers
|
|
247
254
|
}, errorFactory)) && input.servers.every((elem, _index4) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
248
255
|
path: _path + ".servers[" + _index4 + "]",
|
|
249
|
-
expected: "
|
|
256
|
+
expected: "OpenApi.IServer",
|
|
250
257
|
value: elem
|
|
251
258
|
}, errorFactory)) && $ao6(elem, _path + ".servers[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
252
259
|
path: _path + ".servers[" + _index4 + "]",
|
|
253
|
-
expected: "
|
|
260
|
+
expected: "OpenApi.IServer",
|
|
254
261
|
value: elem
|
|
255
262
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
256
263
|
path: _path + ".servers",
|
|
257
|
-
expected: "(Array<
|
|
264
|
+
expected: "(Array<OpenApi.IServer> | undefined)",
|
|
258
265
|
value: input.servers
|
|
259
266
|
}, errorFactory)) && (undefined === input.security || ("object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) || $guard(_exceptionable, {
|
|
260
267
|
path: _path + ".security",
|
|
261
|
-
expected: "(Record<string,
|
|
268
|
+
expected: "(Record<string, OpenApi.ISecurityScheme> | undefined)",
|
|
262
269
|
value: input.security
|
|
263
|
-
}, errorFactory)) && $
|
|
270
|
+
}, errorFactory)) && $ao9(input.security, _path + ".security", true && _exceptionable) || $guard(_exceptionable, {
|
|
264
271
|
path: _path + ".security",
|
|
265
|
-
expected: "(Record<string,
|
|
272
|
+
expected: "(Record<string, OpenApi.ISecurityScheme> | undefined)",
|
|
266
273
|
value: input.security
|
|
267
274
|
}, errorFactory)) && (undefined === input.tags || (Array.isArray(input.tags) || $guard(_exceptionable, {
|
|
268
275
|
path: _path + ".tags",
|
|
269
|
-
expected: "(Array<
|
|
276
|
+
expected: "(Array<OpenApi.IDocument.ITag> | undefined)",
|
|
270
277
|
value: input.tags
|
|
271
278
|
}, errorFactory)) && input.tags.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
272
279
|
path: _path + ".tags[" + _index5 + "]",
|
|
273
|
-
expected: "
|
|
280
|
+
expected: "OpenApi.IDocument.ITag",
|
|
274
281
|
value: elem
|
|
275
|
-
}, errorFactory)) && $
|
|
282
|
+
}, errorFactory)) && $ao20(elem, _path + ".tags[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
276
283
|
path: _path + ".tags[" + _index5 + "]",
|
|
277
|
-
expected: "
|
|
284
|
+
expected: "OpenApi.IDocument.ITag",
|
|
278
285
|
value: elem
|
|
279
286
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
280
287
|
path: _path + ".tags",
|
|
281
|
-
expected: "(Array<
|
|
288
|
+
expected: "(Array<OpenApi.IDocument.ITag> | undefined)",
|
|
282
289
|
value: input.tags
|
|
283
290
|
}, errorFactory)) && (undefined === input.decompose || "boolean" === typeof input.decompose || $guard(_exceptionable, {
|
|
284
291
|
path: _path + ".decompose",
|
|
@@ -289,33 +296,33 @@ var NestiaConfigLoader;
|
|
|
289
296
|
path: _path + ".title",
|
|
290
297
|
expected: "(string | undefined)",
|
|
291
298
|
value: input.title
|
|
299
|
+
}, errorFactory)) && (undefined === input.summary || "string" === typeof input.summary || $guard(_exceptionable, {
|
|
300
|
+
path: _path + ".summary",
|
|
301
|
+
expected: "(string | undefined)",
|
|
302
|
+
value: input.summary
|
|
292
303
|
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
293
304
|
path: _path + ".description",
|
|
294
305
|
expected: "(string | undefined)",
|
|
295
306
|
value: input.description
|
|
296
|
-
}, errorFactory)) && (undefined === input.termsOfService || "string" === typeof input.termsOfService
|
|
307
|
+
}, errorFactory)) && (undefined === input.termsOfService || "string" === typeof input.termsOfService || $guard(_exceptionable, {
|
|
297
308
|
path: _path + ".termsOfService",
|
|
298
|
-
expected: "string
|
|
299
|
-
value: input.termsOfService
|
|
300
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
301
|
-
path: _path + ".termsOfService",
|
|
302
|
-
expected: "((string & Format<\"uri\">) | undefined)",
|
|
309
|
+
expected: "(string | undefined)",
|
|
303
310
|
value: input.termsOfService
|
|
304
311
|
}, errorFactory)) && (undefined === input.contact || ("object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) || $guard(_exceptionable, {
|
|
305
312
|
path: _path + ".contact",
|
|
306
|
-
expected: "(
|
|
313
|
+
expected: "(OpenApi.IDocument.IContact | undefined)",
|
|
307
314
|
value: input.contact
|
|
308
315
|
}, errorFactory)) && $ao4(input.contact, _path + ".contact", true && _exceptionable) || $guard(_exceptionable, {
|
|
309
316
|
path: _path + ".contact",
|
|
310
|
-
expected: "(
|
|
317
|
+
expected: "(OpenApi.IDocument.IContact | undefined)",
|
|
311
318
|
value: input.contact
|
|
312
319
|
}, errorFactory)) && (undefined === input.license || ("object" === typeof input.license && null !== input.license || $guard(_exceptionable, {
|
|
313
320
|
path: _path + ".license",
|
|
314
|
-
expected: "(
|
|
321
|
+
expected: "(OpenApi.IDocument.ILicense | undefined)",
|
|
315
322
|
value: input.license
|
|
316
323
|
}, errorFactory)) && $ao5(input.license, _path + ".license", true && _exceptionable) || $guard(_exceptionable, {
|
|
317
324
|
path: _path + ".license",
|
|
318
|
-
expected: "(
|
|
325
|
+
expected: "(OpenApi.IDocument.ILicense | undefined)",
|
|
319
326
|
value: input.license
|
|
320
327
|
}, errorFactory)) && (undefined === input.version || "string" === typeof input.version || $guard(_exceptionable, {
|
|
321
328
|
path: _path + ".version",
|
|
@@ -326,48 +333,44 @@ var NestiaConfigLoader;
|
|
|
326
333
|
path: _path + ".name",
|
|
327
334
|
expected: "(string | undefined)",
|
|
328
335
|
value: input.name
|
|
329
|
-
}, errorFactory)) && (undefined === input.url || "string" === typeof input.url
|
|
336
|
+
}, errorFactory)) && (undefined === input.url || "string" === typeof input.url || $guard(_exceptionable, {
|
|
330
337
|
path: _path + ".url",
|
|
331
|
-
expected: "string
|
|
332
|
-
value: input.url
|
|
333
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
334
|
-
path: _path + ".url",
|
|
335
|
-
expected: "((string & Format<\"uri\">) | undefined)",
|
|
338
|
+
expected: "(string | undefined)",
|
|
336
339
|
value: input.url
|
|
337
|
-
}, errorFactory)) && (undefined === input.email || "string" === typeof input.email
|
|
338
|
-
path: _path + ".email",
|
|
339
|
-
expected: "string & Format<\"email\">",
|
|
340
|
-
value: input.email
|
|
341
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
340
|
+
}, errorFactory)) && (undefined === input.email || "string" === typeof input.email || $guard(_exceptionable, {
|
|
342
341
|
path: _path + ".email",
|
|
343
|
-
expected: "(
|
|
342
|
+
expected: "(string | undefined)",
|
|
344
343
|
value: input.email
|
|
345
344
|
}, errorFactory));
|
|
346
345
|
const $ao5 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
|
|
347
346
|
path: _path + ".name",
|
|
348
347
|
expected: "string",
|
|
349
348
|
value: input.name
|
|
350
|
-
}, errorFactory)) && (undefined === input.
|
|
351
|
-
path: _path + ".
|
|
352
|
-
expected: "string
|
|
353
|
-
value: input.
|
|
354
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
349
|
+
}, errorFactory)) && (undefined === input.identifier || "string" === typeof input.identifier || $guard(_exceptionable, {
|
|
350
|
+
path: _path + ".identifier",
|
|
351
|
+
expected: "(string | undefined)",
|
|
352
|
+
value: input.identifier
|
|
353
|
+
}, errorFactory)) && (undefined === input.url || "string" === typeof input.url || $guard(_exceptionable, {
|
|
355
354
|
path: _path + ".url",
|
|
356
|
-
expected: "(
|
|
355
|
+
expected: "(string | undefined)",
|
|
357
356
|
value: input.url
|
|
358
357
|
}, errorFactory));
|
|
359
|
-
const $ao6 = (input, _path, _exceptionable = true) => ("string" === typeof input.url
|
|
358
|
+
const $ao6 = (input, _path, _exceptionable = true) => ("string" === typeof input.url || $guard(_exceptionable, {
|
|
360
359
|
path: _path + ".url",
|
|
361
|
-
expected: "string
|
|
362
|
-
value: input.url
|
|
363
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
364
|
-
path: _path + ".url",
|
|
365
|
-
expected: "(string & Format<\"uri\">)",
|
|
360
|
+
expected: "string",
|
|
366
361
|
value: input.url
|
|
367
362
|
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
368
363
|
path: _path + ".description",
|
|
369
364
|
expected: "(string | undefined)",
|
|
370
365
|
value: input.description
|
|
366
|
+
}, errorFactory)) && (undefined === input.variables || ("object" === typeof input.variables && null !== input.variables && false === Array.isArray(input.variables) || $guard(_exceptionable, {
|
|
367
|
+
path: _path + ".variables",
|
|
368
|
+
expected: "(Record<string, OpenApi.IServer.IVariable> | undefined)",
|
|
369
|
+
value: input.variables
|
|
370
|
+
}, errorFactory)) && $ao7(input.variables, _path + ".variables", true && _exceptionable) || $guard(_exceptionable, {
|
|
371
|
+
path: _path + ".variables",
|
|
372
|
+
expected: "(Record<string, OpenApi.IServer.IVariable> | undefined)",
|
|
373
|
+
value: input.variables
|
|
371
374
|
}, errorFactory));
|
|
372
375
|
const $ao7 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
373
376
|
const value = input[key];
|
|
@@ -375,15 +378,71 @@ var NestiaConfigLoader;
|
|
|
375
378
|
return true;
|
|
376
379
|
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
|
377
380
|
path: _path + $join(key),
|
|
378
|
-
expected: "
|
|
381
|
+
expected: "OpenApi.IServer.IVariable",
|
|
382
|
+
value: value
|
|
383
|
+
}, errorFactory)) && $ao8(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
384
|
+
path: _path + $join(key),
|
|
385
|
+
expected: "OpenApi.IServer.IVariable",
|
|
386
|
+
value: value
|
|
387
|
+
}, errorFactory);
|
|
388
|
+
});
|
|
389
|
+
const $ao8 = (input, _path, _exceptionable = true) => ("string" === typeof input["default"] || $guard(_exceptionable, {
|
|
390
|
+
path: _path + "[\"default\"]",
|
|
391
|
+
expected: "string",
|
|
392
|
+
value: input["default"]
|
|
393
|
+
}, errorFactory)) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
|
394
|
+
path: _path + "[\"enum\"]",
|
|
395
|
+
expected: "((Array<string> & MinItems<1>) | undefined)",
|
|
396
|
+
value: input["enum"]
|
|
397
|
+
}, errorFactory)) && ((1 <= input["enum"].length || $guard(_exceptionable, {
|
|
398
|
+
path: _path + "[\"enum\"]",
|
|
399
|
+
expected: "Array<> & MinItems<1>",
|
|
400
|
+
value: input["enum"]
|
|
401
|
+
}, errorFactory)) && input["enum"].every((elem, _index6) => "string" === typeof elem || $guard(_exceptionable, {
|
|
402
|
+
path: _path + "[\"enum\"][" + _index6 + "]",
|
|
403
|
+
expected: "string",
|
|
404
|
+
value: elem
|
|
405
|
+
}, errorFactory))) || $guard(_exceptionable, {
|
|
406
|
+
path: _path + "[\"enum\"]",
|
|
407
|
+
expected: "((Array<string> & MinItems<1>) | undefined)",
|
|
408
|
+
value: input["enum"]
|
|
409
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
410
|
+
path: _path + ".description",
|
|
411
|
+
expected: "(string | undefined)",
|
|
412
|
+
value: input.description
|
|
413
|
+
}, errorFactory));
|
|
414
|
+
const $ao9 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
415
|
+
const value = input[key];
|
|
416
|
+
if (undefined === value)
|
|
417
|
+
return true;
|
|
418
|
+
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
|
419
|
+
path: _path + $join(key),
|
|
420
|
+
expected: "(OpenApi.ISecurityScheme.IApiKey | OpenApi.ISecurityScheme.IHttpBasic | OpenApi.ISecurityScheme.IHttpBearer | OpenApi.ISecurityScheme.IOAuth2 | OpenApi.ISecurityScheme.IOpenId)",
|
|
379
421
|
value: value
|
|
380
422
|
}, errorFactory)) && $au0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
381
423
|
path: _path + $join(key),
|
|
382
|
-
expected: "(
|
|
424
|
+
expected: "(OpenApi.ISecurityScheme.IApiKey | OpenApi.ISecurityScheme.IHttpBasic | OpenApi.ISecurityScheme.IHttpBearer | OpenApi.ISecurityScheme.IOAuth2 | OpenApi.ISecurityScheme.IOpenId)",
|
|
383
425
|
value: value
|
|
384
426
|
}, errorFactory);
|
|
385
427
|
});
|
|
386
|
-
const $
|
|
428
|
+
const $ao10 = (input, _path, _exceptionable = true) => ("apiKey" === input.type || $guard(_exceptionable, {
|
|
429
|
+
path: _path + ".type",
|
|
430
|
+
expected: "\"apiKey\"",
|
|
431
|
+
value: input.type
|
|
432
|
+
}, errorFactory)) && (undefined === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || $guard(_exceptionable, {
|
|
433
|
+
path: _path + "[\"in\"]",
|
|
434
|
+
expected: "(\"cookie\" | \"header\" | \"query\" | undefined)",
|
|
435
|
+
value: input["in"]
|
|
436
|
+
}, errorFactory)) && (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
|
437
|
+
path: _path + ".name",
|
|
438
|
+
expected: "(string | undefined)",
|
|
439
|
+
value: input.name
|
|
440
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
441
|
+
path: _path + ".description",
|
|
442
|
+
expected: "(string | undefined)",
|
|
443
|
+
value: input.description
|
|
444
|
+
}, errorFactory));
|
|
445
|
+
const $ao11 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
|
387
446
|
path: _path + ".type",
|
|
388
447
|
expected: "\"http\"",
|
|
389
448
|
value: input.type
|
|
@@ -391,8 +450,12 @@ var NestiaConfigLoader;
|
|
|
391
450
|
path: _path + ".scheme",
|
|
392
451
|
expected: "\"basic\"",
|
|
393
452
|
value: input.scheme
|
|
453
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
454
|
+
path: _path + ".description",
|
|
455
|
+
expected: "(string | undefined)",
|
|
456
|
+
value: input.description
|
|
394
457
|
}, errorFactory));
|
|
395
|
-
const $
|
|
458
|
+
const $ao12 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
|
396
459
|
path: _path + ".type",
|
|
397
460
|
expected: "\"http\"",
|
|
398
461
|
value: input.type
|
|
@@ -404,82 +467,64 @@ var NestiaConfigLoader;
|
|
|
404
467
|
path: _path + ".bearerFormat",
|
|
405
468
|
expected: "(string | undefined)",
|
|
406
469
|
value: input.bearerFormat
|
|
407
|
-
}, errorFactory))
|
|
408
|
-
|
|
409
|
-
path: _path + ".type",
|
|
410
|
-
expected: "\"apiKey\"",
|
|
411
|
-
value: input.type
|
|
412
|
-
}, errorFactory)) && (undefined === input["in"] || "cookie" === input["in"] || "header" === input["in"] || "query" === input["in"] || $guard(_exceptionable, {
|
|
413
|
-
path: _path + "[\"in\"]",
|
|
414
|
-
expected: "(\"cookie\" | \"header\" | \"query\" | undefined)",
|
|
415
|
-
value: input["in"]
|
|
416
|
-
}, errorFactory)) && (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
|
417
|
-
path: _path + ".name",
|
|
470
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
471
|
+
path: _path + ".description",
|
|
418
472
|
expected: "(string | undefined)",
|
|
419
|
-
value: input.
|
|
420
|
-
}, errorFactory));
|
|
421
|
-
const $ao11 = (input, _path, _exceptionable = true) => ("openIdConnect" === input.type || $guard(_exceptionable, {
|
|
422
|
-
path: _path + ".type",
|
|
423
|
-
expected: "\"openIdConnect\"",
|
|
424
|
-
value: input.type
|
|
425
|
-
}, errorFactory)) && ("string" === typeof input.openIdConnectUrl || $guard(_exceptionable, {
|
|
426
|
-
path: _path + ".openIdConnectUrl",
|
|
427
|
-
expected: "string",
|
|
428
|
-
value: input.openIdConnectUrl
|
|
473
|
+
value: input.description
|
|
429
474
|
}, errorFactory));
|
|
430
|
-
const $
|
|
475
|
+
const $ao13 = (input, _path, _exceptionable = true) => ("oauth2" === input.type || $guard(_exceptionable, {
|
|
431
476
|
path: _path + ".type",
|
|
432
477
|
expected: "\"oauth2\"",
|
|
433
478
|
value: input.type
|
|
434
479
|
}, errorFactory)) && (("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) || $guard(_exceptionable, {
|
|
435
480
|
path: _path + ".flows",
|
|
436
|
-
expected: "
|
|
481
|
+
expected: "OpenApi.ISecurityScheme.IOAuth2.IFlowSet",
|
|
437
482
|
value: input.flows
|
|
438
|
-
}, errorFactory)) && $
|
|
483
|
+
}, errorFactory)) && $ao14(input.flows, _path + ".flows", true && _exceptionable) || $guard(_exceptionable, {
|
|
439
484
|
path: _path + ".flows",
|
|
440
|
-
expected: "
|
|
485
|
+
expected: "OpenApi.ISecurityScheme.IOAuth2.IFlowSet",
|
|
441
486
|
value: input.flows
|
|
442
487
|
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
443
488
|
path: _path + ".description",
|
|
444
489
|
expected: "(string | undefined)",
|
|
445
490
|
value: input.description
|
|
446
491
|
}, errorFactory));
|
|
447
|
-
const $
|
|
492
|
+
const $ao14 = (input, _path, _exceptionable = true) => (undefined === input.authorizationCode || ("object" === typeof input.authorizationCode && null !== input.authorizationCode && false === Array.isArray(input.authorizationCode) || $guard(_exceptionable, {
|
|
448
493
|
path: _path + ".authorizationCode",
|
|
449
|
-
expected: "(
|
|
494
|
+
expected: "(OpenApi.ISecurityScheme.IOAuth2.IFlow | undefined)",
|
|
450
495
|
value: input.authorizationCode
|
|
451
|
-
}, errorFactory)) && $
|
|
496
|
+
}, errorFactory)) && $ao15(input.authorizationCode, _path + ".authorizationCode", true && _exceptionable) || $guard(_exceptionable, {
|
|
452
497
|
path: _path + ".authorizationCode",
|
|
453
|
-
expected: "(
|
|
498
|
+
expected: "(OpenApi.ISecurityScheme.IOAuth2.IFlow | undefined)",
|
|
454
499
|
value: input.authorizationCode
|
|
455
|
-
}, errorFactory)) && (undefined === input.implicit || ("object" === typeof input.implicit && null !== input.implicit || $guard(_exceptionable, {
|
|
500
|
+
}, errorFactory)) && (undefined === input.implicit || ("object" === typeof input.implicit && null !== input.implicit && false === Array.isArray(input.implicit) || $guard(_exceptionable, {
|
|
456
501
|
path: _path + ".implicit",
|
|
457
|
-
expected: "(Omit<
|
|
502
|
+
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
|
458
503
|
value: input.implicit
|
|
459
|
-
}, errorFactory)) && $
|
|
504
|
+
}, errorFactory)) && $ao17(input.implicit, _path + ".implicit", true && _exceptionable) || $guard(_exceptionable, {
|
|
460
505
|
path: _path + ".implicit",
|
|
461
|
-
expected: "(Omit<
|
|
506
|
+
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
|
462
507
|
value: input.implicit
|
|
463
508
|
}, errorFactory)) && (undefined === input.password || ("object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) || $guard(_exceptionable, {
|
|
464
509
|
path: _path + ".password",
|
|
465
|
-
expected: "(Omit<
|
|
510
|
+
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
466
511
|
value: input.password
|
|
467
|
-
}, errorFactory)) && $
|
|
512
|
+
}, errorFactory)) && $ao18(input.password, _path + ".password", true && _exceptionable) || $guard(_exceptionable, {
|
|
468
513
|
path: _path + ".password",
|
|
469
|
-
expected: "(Omit<
|
|
514
|
+
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
470
515
|
value: input.password
|
|
471
516
|
}, errorFactory)) && (undefined === input.clientCredentials || ("object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) || $guard(_exceptionable, {
|
|
472
517
|
path: _path + ".clientCredentials",
|
|
473
|
-
expected: "(Omit<
|
|
518
|
+
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
474
519
|
value: input.clientCredentials
|
|
475
|
-
}, errorFactory)) && $
|
|
520
|
+
}, errorFactory)) && $ao18(input.clientCredentials, _path + ".clientCredentials", true && _exceptionable) || $guard(_exceptionable, {
|
|
476
521
|
path: _path + ".clientCredentials",
|
|
477
|
-
expected: "(Omit<
|
|
522
|
+
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
478
523
|
value: input.clientCredentials
|
|
479
524
|
}, errorFactory));
|
|
480
|
-
const $
|
|
525
|
+
const $ao15 = (input, _path, _exceptionable = true) => (undefined === input.authorizationUrl || "string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
|
481
526
|
path: _path + ".authorizationUrl",
|
|
482
|
-
expected: "string",
|
|
527
|
+
expected: "(string | undefined)",
|
|
483
528
|
value: input.authorizationUrl
|
|
484
529
|
}, errorFactory)) && (undefined === input.tokenUrl || "string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
|
485
530
|
path: _path + ".tokenUrl",
|
|
@@ -493,12 +538,12 @@ var NestiaConfigLoader;
|
|
|
493
538
|
path: _path + ".scopes",
|
|
494
539
|
expected: "(Record<string, string> | undefined)",
|
|
495
540
|
value: input.scopes
|
|
496
|
-
}, errorFactory)) && $
|
|
541
|
+
}, errorFactory)) && $ao16(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
|
497
542
|
path: _path + ".scopes",
|
|
498
543
|
expected: "(Record<string, string> | undefined)",
|
|
499
544
|
value: input.scopes
|
|
500
545
|
}, errorFactory));
|
|
501
|
-
const $
|
|
546
|
+
const $ao16 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
502
547
|
const value = input[key];
|
|
503
548
|
if (undefined === value)
|
|
504
549
|
return true;
|
|
@@ -508,9 +553,9 @@ var NestiaConfigLoader;
|
|
|
508
553
|
value: value
|
|
509
554
|
}, errorFactory);
|
|
510
555
|
});
|
|
511
|
-
const $
|
|
556
|
+
const $ao17 = (input, _path, _exceptionable = true) => (undefined === input.authorizationUrl || "string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
|
512
557
|
path: _path + ".authorizationUrl",
|
|
513
|
-
expected: "string",
|
|
558
|
+
expected: "(string | undefined)",
|
|
514
559
|
value: input.authorizationUrl
|
|
515
560
|
}, errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
|
516
561
|
path: _path + ".refreshUrl",
|
|
@@ -520,12 +565,12 @@ var NestiaConfigLoader;
|
|
|
520
565
|
path: _path + ".scopes",
|
|
521
566
|
expected: "(Record<string, string> | undefined)",
|
|
522
567
|
value: input.scopes
|
|
523
|
-
}, errorFactory)) && $
|
|
568
|
+
}, errorFactory)) && $ao16(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
|
524
569
|
path: _path + ".scopes",
|
|
525
570
|
expected: "(Record<string, string> | undefined)",
|
|
526
571
|
value: input.scopes
|
|
527
572
|
}, errorFactory));
|
|
528
|
-
const $
|
|
573
|
+
const $ao18 = (input, _path, _exceptionable = true) => (undefined === input.tokenUrl || "string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
|
529
574
|
path: _path + ".tokenUrl",
|
|
530
575
|
expected: "(string | undefined)",
|
|
531
576
|
value: input.tokenUrl
|
|
@@ -537,12 +582,25 @@ var NestiaConfigLoader;
|
|
|
537
582
|
path: _path + ".scopes",
|
|
538
583
|
expected: "(Record<string, string> | undefined)",
|
|
539
584
|
value: input.scopes
|
|
540
|
-
}, errorFactory)) && $
|
|
585
|
+
}, errorFactory)) && $ao16(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
|
541
586
|
path: _path + ".scopes",
|
|
542
587
|
expected: "(Record<string, string> | undefined)",
|
|
543
588
|
value: input.scopes
|
|
544
589
|
}, errorFactory));
|
|
545
|
-
const $
|
|
590
|
+
const $ao19 = (input, _path, _exceptionable = true) => ("openIdConnect" === input.type || $guard(_exceptionable, {
|
|
591
|
+
path: _path + ".type",
|
|
592
|
+
expected: "\"openIdConnect\"",
|
|
593
|
+
value: input.type
|
|
594
|
+
}, errorFactory)) && ("string" === typeof input.openIdConnectUrl || $guard(_exceptionable, {
|
|
595
|
+
path: _path + ".openIdConnectUrl",
|
|
596
|
+
expected: "string",
|
|
597
|
+
value: input.openIdConnectUrl
|
|
598
|
+
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
599
|
+
path: _path + ".description",
|
|
600
|
+
expected: "(string | undefined)",
|
|
601
|
+
value: input.description
|
|
602
|
+
}, errorFactory));
|
|
603
|
+
const $ao20 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
|
|
546
604
|
path: _path + ".name",
|
|
547
605
|
expected: "string",
|
|
548
606
|
value: input.name
|
|
@@ -552,20 +610,20 @@ var NestiaConfigLoader;
|
|
|
552
610
|
value: input.description
|
|
553
611
|
}, errorFactory));
|
|
554
612
|
const $au0 = (input, _path, _exceptionable = true) => (() => {
|
|
555
|
-
if ("
|
|
556
|
-
return $ao8(input, _path, true && _exceptionable);
|
|
557
|
-
else if ("bearer" === input.scheme)
|
|
558
|
-
return $ao9(input, _path, true && _exceptionable);
|
|
559
|
-
else if ("apiKey" === input.type)
|
|
613
|
+
if ("apiKey" === input.type)
|
|
560
614
|
return $ao10(input, _path, true && _exceptionable);
|
|
561
|
-
else if ("
|
|
615
|
+
else if ("basic" === input.scheme)
|
|
562
616
|
return $ao11(input, _path, true && _exceptionable);
|
|
563
|
-
else if ("
|
|
617
|
+
else if ("bearer" === input.scheme)
|
|
564
618
|
return $ao12(input, _path, true && _exceptionable);
|
|
619
|
+
else if ("oauth2" === input.type)
|
|
620
|
+
return $ao13(input, _path, true && _exceptionable);
|
|
621
|
+
else if ("openIdConnect" === input.type)
|
|
622
|
+
return $ao19(input, _path, true && _exceptionable);
|
|
565
623
|
else
|
|
566
624
|
return $guard(_exceptionable, {
|
|
567
625
|
path: _path,
|
|
568
|
-
expected: "(
|
|
626
|
+
expected: "(OpenApi.ISecurityScheme.IApiKey | OpenApi.ISecurityScheme.IHttpBasic | OpenApi.ISecurityScheme.IHttpBearer | OpenApi.ISecurityScheme.IOAuth2 | OpenApi.ISecurityScheme.IOpenId)",
|
|
569
627
|
value: input
|
|
570
628
|
}, errorFactory);
|
|
571
629
|
})();
|