@nestia/migrate 0.7.9 → 0.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/MigrateApplication.js +88 -116
- package/lib/MigrateApplication.js.map +1 -1
- package/lib/bundles/NEST_TEMPLATE.js +2 -2
- package/lib/bundles/SDK_TEMPLATE.js +1 -1
- package/lib/module.d.ts +1 -1
- package/lib/module.js +1 -1
- package/lib/module.js.map +1 -1
- package/lib/programmers/MigrateApiSimulatationProgrammer.js +17 -17
- package/lib/programmers/MigrateApiSimulatationProgrammer.js.map +1 -1
- package/lib/structures/ISwaggerComponents.d.ts +2 -2
- package/lib/structures/{ISwaggerSecurity.d.ts → ISwaggerSecurityScheme.d.ts} +4 -4
- package/lib/structures/{ISwaggerSecurity.js → ISwaggerSecurityScheme.js} +1 -1
- package/lib/structures/ISwaggerSecurityScheme.js.map +1 -0
- package/package.json +8 -8
- package/src/bundles/NEST_TEMPLATE.ts +2 -2
- package/src/bundles/SDK_TEMPLATE.ts +1 -1
- package/src/module.ts +1 -1
- package/src/programmers/MigrateApiSimulatationProgrammer.ts +10 -11
- package/src/structures/ISwaggerComponents.ts +2 -2
- package/src/structures/{ISwaggerSecurity.ts → ISwaggerSecurityScheme.ts} +9 -9
- package/lib/structures/ISwaggerSecurity.js.map +0 -1
@@ -24,9 +24,7 @@ class MigrateApplication {
|
|
24
24
|
const value = input[key];
|
25
25
|
if (undefined === value)
|
26
26
|
return true;
|
27
|
-
|
28
|
-
return "object" === typeof value && null !== value && false === Array.isArray(value) && $iu0(value);
|
29
|
-
return true;
|
27
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $iu0(value);
|
30
28
|
});
|
31
29
|
const $io7 = input => null !== input.type && undefined === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
32
30
|
const $io8 = input => "null" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input["x-typia-optional"] || "boolean" === typeof input["x-typia-optional"]) && (undefined === input["x-typia-rest"] || "boolean" === typeof input["x-typia-rest"]);
|
@@ -44,13 +42,11 @@ class MigrateApplication {
|
|
44
42
|
const value = input[key];
|
45
43
|
if (undefined === value)
|
46
44
|
return true;
|
47
|
-
|
48
|
-
return "object" === typeof value && null !== value && $iu1(value);
|
49
|
-
return true;
|
45
|
+
return "object" === typeof value && null !== value && $iu1(value);
|
50
46
|
});
|
51
47
|
const $io20 = input => "http" === input.type && "basic" === input.scheme;
|
52
48
|
const $io21 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat);
|
53
|
-
const $io22 = input => "apiKey" === input.type && ("header" === input["in"] || "query" === input["in"] || "cookie" === input["in"]) && "string" === typeof input.name;
|
49
|
+
const $io22 = input => "apiKey" === input.type && (undefined === input["in"] || "header" === input["in"] || "query" === input["in"] || "cookie" === input["in"]) && (undefined === input.name || "string" === typeof input.name);
|
54
50
|
const $io23 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl;
|
55
51
|
const $io24 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && $io25(input.flows)) && (undefined === input.description || "string" === typeof input.description);
|
56
52
|
const $io25 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && $io26(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && $io28(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && $io29(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && $io29(input.clientCredentials));
|
@@ -59,9 +55,7 @@ class MigrateApplication {
|
|
59
55
|
const value = input[key];
|
60
56
|
if (undefined === value)
|
61
57
|
return true;
|
62
|
-
|
63
|
-
return "string" === typeof value;
|
64
|
-
return true;
|
58
|
+
return "string" === typeof value;
|
65
59
|
});
|
66
60
|
const $io28 = input => "string" === typeof input.authorizationUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io27(input.scopes));
|
67
61
|
const $io29 = input => "string" === typeof input.tokenUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io27(input.scopes));
|
@@ -69,17 +63,13 @@ class MigrateApplication {
|
|
69
63
|
const value = input[key];
|
70
64
|
if (undefined === value)
|
71
65
|
return true;
|
72
|
-
|
73
|
-
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io31(value);
|
74
|
-
return true;
|
66
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io31(value);
|
75
67
|
});
|
76
68
|
const $io31 = input => Object.keys(input).every(key => {
|
77
69
|
const value = input[key];
|
78
70
|
if (undefined === value)
|
79
71
|
return true;
|
80
|
-
|
81
|
-
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io32(value);
|
82
|
-
return true;
|
72
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io32(value);
|
83
73
|
});
|
84
74
|
const $io32 = input => (undefined === input.parameters || Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && $io33(elem))) && (undefined === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && $io34(input.requestBody)) && (undefined === input.responses || "object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) && $io41(input.responses)) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input.security || Array.isArray(input.security) && input.security.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io43(elem))) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input["x-nestia-jsDocTags"] || Array.isArray(input["x-nestia-jsDocTags"]) && input["x-nestia-jsDocTags"].every(elem => "object" === typeof elem && null !== elem && $io44(elem)));
|
85
75
|
const $io33 = input => (undefined === input.name || "string" === typeof input.name) && ("header" === input["in"] || "query" === input["in"] || "cookie" === input["in"] || "path" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description);
|
@@ -94,18 +84,14 @@ class MigrateApplication {
|
|
94
84
|
const value = input[key];
|
95
85
|
if (undefined === value)
|
96
86
|
return true;
|
97
|
-
|
98
|
-
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io42(value);
|
99
|
-
return true;
|
87
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io42(value);
|
100
88
|
});
|
101
89
|
const $io42 = input => (undefined === input.description || "string" === typeof input.description) && (undefined === input.content || "object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && $io35(input.content)) && (undefined === input["x-nestia-encrypted"] || "boolean" === typeof input["x-nestia-encrypted"]);
|
102
90
|
const $io43 = input => Object.keys(input).every(key => {
|
103
91
|
const value = input[key];
|
104
92
|
if (undefined === value)
|
105
93
|
return true;
|
106
|
-
|
107
|
-
return Array.isArray(value) && value.every(elem => "string" === typeof elem);
|
108
|
-
return true;
|
94
|
+
return Array.isArray(value) && value.every(elem => "string" === typeof elem);
|
109
95
|
});
|
110
96
|
const $io44 = input => "string" === typeof input.name && (undefined === input.text || Array.isArray(input.text) && input.text.every(elem => "object" === typeof elem && null !== elem && $io45(elem)));
|
111
97
|
const $io45 = input => "string" === typeof input.text && "string" === typeof input.kind;
|
@@ -304,28 +290,26 @@ class MigrateApplication {
|
|
304
290
|
value: input.schemas
|
305
291
|
})) && (undefined === input.securitySchemes || ("object" === typeof input.securitySchemes && null !== input.securitySchemes && false === Array.isArray(input.securitySchemes) || $guard(_exceptionable, {
|
306
292
|
path: _path + ".securitySchemes",
|
307
|
-
expected: "(Record<string,
|
293
|
+
expected: "(Record<string, ISwaggerSecurityScheme> | undefined)",
|
308
294
|
value: input.securitySchemes
|
309
295
|
})) && $ao19(input.securitySchemes, _path + ".securitySchemes", true && _exceptionable) || $guard(_exceptionable, {
|
310
296
|
path: _path + ".securitySchemes",
|
311
|
-
expected: "(Record<string,
|
297
|
+
expected: "(Record<string, ISwaggerSecurityScheme> | undefined)",
|
312
298
|
value: input.securitySchemes
|
313
299
|
}));
|
314
300
|
const $ao6 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
315
301
|
const value = input[key];
|
316
302
|
if (undefined === value)
|
317
303
|
return true;
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
});
|
328
|
-
return true;
|
304
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
305
|
+
path: _path + $join(key),
|
306
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
307
|
+
value: value
|
308
|
+
})) && $au0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
309
|
+
path: _path + $join(key),
|
310
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
311
|
+
value: value
|
312
|
+
});
|
329
313
|
});
|
330
314
|
const $ao7 = (input, _path, _exceptionable = true) => (null !== input.type || $guard(_exceptionable, {
|
331
315
|
path: _path + ".type",
|
@@ -919,17 +903,15 @@ class MigrateApplication {
|
|
919
903
|
const value = input[key];
|
920
904
|
if (undefined === value)
|
921
905
|
return true;
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
});
|
932
|
-
return true;
|
906
|
+
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
907
|
+
path: _path + $join(key),
|
908
|
+
expected: "(ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IOAuth2 | ISwaggerSecurityScheme.IOpenId)",
|
909
|
+
value: value
|
910
|
+
})) && $au1(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
911
|
+
path: _path + $join(key),
|
912
|
+
expected: "(ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IOAuth2 | ISwaggerSecurityScheme.IOpenId)",
|
913
|
+
value: value
|
914
|
+
});
|
933
915
|
});
|
934
916
|
const $ao20 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
935
917
|
path: _path + ".type",
|
@@ -957,13 +939,13 @@ class MigrateApplication {
|
|
957
939
|
path: _path + ".type",
|
958
940
|
expected: "\"apiKey\"",
|
959
941
|
value: input.type
|
960
|
-
})) && ("header" === input["in"] || "query" === input["in"] || "cookie" === input["in"] || $guard(_exceptionable, {
|
942
|
+
})) && (undefined === input["in"] || "header" === input["in"] || "query" === input["in"] || "cookie" === input["in"] || $guard(_exceptionable, {
|
961
943
|
path: _path + "[\"in\"]",
|
962
|
-
expected: "(\"cookie\" | \"header\" | \"query\")",
|
944
|
+
expected: "(\"cookie\" | \"header\" | \"query\" | undefined)",
|
963
945
|
value: input["in"]
|
964
|
-
})) && ("string" === typeof input.name || $guard(_exceptionable, {
|
946
|
+
})) && (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
965
947
|
path: _path + ".name",
|
966
|
-
expected: "string",
|
948
|
+
expected: "(string | undefined)",
|
967
949
|
value: input.name
|
968
950
|
}));
|
969
951
|
const $ao23 = (input, _path, _exceptionable = true) => ("openIdConnect" === input.type || $guard(_exceptionable, {
|
@@ -981,11 +963,11 @@ class MigrateApplication {
|
|
981
963
|
value: input.type
|
982
964
|
})) && (("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) || $guard(_exceptionable, {
|
983
965
|
path: _path + ".flows",
|
984
|
-
expected: "
|
966
|
+
expected: "ISwaggerSecurityScheme.IOAuth2.IFlowSet",
|
985
967
|
value: input.flows
|
986
968
|
})) && $ao25(input.flows, _path + ".flows", true && _exceptionable) || $guard(_exceptionable, {
|
987
969
|
path: _path + ".flows",
|
988
|
-
expected: "
|
970
|
+
expected: "ISwaggerSecurityScheme.IOAuth2.IFlowSet",
|
989
971
|
value: input.flows
|
990
972
|
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
991
973
|
path: _path + ".description",
|
@@ -994,35 +976,35 @@ class MigrateApplication {
|
|
994
976
|
}));
|
995
977
|
const $ao25 = (input, _path, _exceptionable = true) => (undefined === input.authorizationCode || ("object" === typeof input.authorizationCode && null !== input.authorizationCode || $guard(_exceptionable, {
|
996
978
|
path: _path + ".authorizationCode",
|
997
|
-
expected: "(
|
979
|
+
expected: "(ISwaggerSecurityScheme.IOAuth2.IFlow | undefined)",
|
998
980
|
value: input.authorizationCode
|
999
981
|
})) && $ao26(input.authorizationCode, _path + ".authorizationCode", true && _exceptionable) || $guard(_exceptionable, {
|
1000
982
|
path: _path + ".authorizationCode",
|
1001
|
-
expected: "(
|
983
|
+
expected: "(ISwaggerSecurityScheme.IOAuth2.IFlow | undefined)",
|
1002
984
|
value: input.authorizationCode
|
1003
985
|
})) && (undefined === input.implicit || ("object" === typeof input.implicit && null !== input.implicit || $guard(_exceptionable, {
|
1004
986
|
path: _path + ".implicit",
|
1005
|
-
expected: "(Omit<
|
987
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
1006
988
|
value: input.implicit
|
1007
989
|
})) && $ao28(input.implicit, _path + ".implicit", true && _exceptionable) || $guard(_exceptionable, {
|
1008
990
|
path: _path + ".implicit",
|
1009
|
-
expected: "(Omit<
|
991
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
1010
992
|
value: input.implicit
|
1011
993
|
})) && (undefined === input.password || ("object" === typeof input.password && null !== input.password || $guard(_exceptionable, {
|
1012
994
|
path: _path + ".password",
|
1013
|
-
expected: "(Omit<
|
995
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1014
996
|
value: input.password
|
1015
997
|
})) && $ao29(input.password, _path + ".password", true && _exceptionable) || $guard(_exceptionable, {
|
1016
998
|
path: _path + ".password",
|
1017
|
-
expected: "(Omit<
|
999
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1018
1000
|
value: input.password
|
1019
1001
|
})) && (undefined === input.clientCredentials || ("object" === typeof input.clientCredentials && null !== input.clientCredentials || $guard(_exceptionable, {
|
1020
1002
|
path: _path + ".clientCredentials",
|
1021
|
-
expected: "(Omit<
|
1003
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1022
1004
|
value: input.clientCredentials
|
1023
1005
|
})) && $ao29(input.clientCredentials, _path + ".clientCredentials", true && _exceptionable) || $guard(_exceptionable, {
|
1024
1006
|
path: _path + ".clientCredentials",
|
1025
|
-
expected: "(Omit<
|
1007
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
1026
1008
|
value: input.clientCredentials
|
1027
1009
|
}));
|
1028
1010
|
const $ao26 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
@@ -1050,13 +1032,11 @@ class MigrateApplication {
|
|
1050
1032
|
const value = input[key];
|
1051
1033
|
if (undefined === value)
|
1052
1034
|
return true;
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
});
|
1059
|
-
return true;
|
1035
|
+
return "string" === typeof value || $guard(_exceptionable, {
|
1036
|
+
path: _path + $join(key),
|
1037
|
+
expected: "string",
|
1038
|
+
value: value
|
1039
|
+
});
|
1060
1040
|
});
|
1061
1041
|
const $ao28 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
1062
1042
|
path: _path + ".authorizationUrl",
|
@@ -1096,33 +1076,29 @@ class MigrateApplication {
|
|
1096
1076
|
const value = input[key];
|
1097
1077
|
if (undefined === value)
|
1098
1078
|
return true;
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
});
|
1109
|
-
return true;
|
1079
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
1080
|
+
path: _path + $join(key),
|
1081
|
+
expected: "ISwagger.IPath",
|
1082
|
+
value: value
|
1083
|
+
})) && $ao31(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1084
|
+
path: _path + $join(key),
|
1085
|
+
expected: "ISwagger.IPath",
|
1086
|
+
value: value
|
1087
|
+
});
|
1110
1088
|
});
|
1111
1089
|
const $ao31 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1112
1090
|
const value = input[key];
|
1113
1091
|
if (undefined === value)
|
1114
1092
|
return true;
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
});
|
1125
|
-
return true;
|
1093
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
1094
|
+
path: _path + $join(key),
|
1095
|
+
expected: "ISwaggerRoute",
|
1096
|
+
value: value
|
1097
|
+
})) && $ao32(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1098
|
+
path: _path + $join(key),
|
1099
|
+
expected: "ISwaggerRoute",
|
1100
|
+
value: value
|
1101
|
+
});
|
1126
1102
|
});
|
1127
1103
|
const $ao32 = (input, _path, _exceptionable = true) => (undefined === input.parameters || (Array.isArray(input.parameters) || $guard(_exceptionable, {
|
1128
1104
|
path: _path + ".parameters",
|
@@ -1349,17 +1325,15 @@ class MigrateApplication {
|
|
1349
1325
|
const value = input[key];
|
1350
1326
|
if (undefined === value)
|
1351
1327
|
return true;
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
});
|
1362
|
-
return true;
|
1328
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
1329
|
+
path: _path + $join(key),
|
1330
|
+
expected: "__type.o5",
|
1331
|
+
value: value
|
1332
|
+
})) && $ao42(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1333
|
+
path: _path + $join(key),
|
1334
|
+
expected: "__type.o5",
|
1335
|
+
value: value
|
1336
|
+
});
|
1363
1337
|
});
|
1364
1338
|
const $ao42 = (input, _path, _exceptionable = true) => (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1365
1339
|
path: _path + ".description",
|
@@ -1382,21 +1356,19 @@ class MigrateApplication {
|
|
1382
1356
|
const value = input[key];
|
1383
1357
|
if (undefined === value)
|
1384
1358
|
return true;
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1398
|
-
});
|
1399
|
-
return true;
|
1359
|
+
return (Array.isArray(value) || $guard(_exceptionable, {
|
1360
|
+
path: _path + $join(key),
|
1361
|
+
expected: "Array<string>",
|
1362
|
+
value: value
|
1363
|
+
})) && value.every((elem, _index15) => "string" === typeof elem || $guard(_exceptionable, {
|
1364
|
+
path: _path + $join(key) + "[" + _index15 + "]",
|
1365
|
+
expected: "string",
|
1366
|
+
value: elem
|
1367
|
+
})) || $guard(_exceptionable, {
|
1368
|
+
path: _path + $join(key),
|
1369
|
+
expected: "Array<string>",
|
1370
|
+
value: value
|
1371
|
+
});
|
1400
1372
|
});
|
1401
1373
|
const $ao44 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
|
1402
1374
|
path: _path + ".name",
|
@@ -1466,7 +1438,7 @@ class MigrateApplication {
|
|
1466
1438
|
else
|
1467
1439
|
return $guard(_exceptionable, {
|
1468
1440
|
path: _path,
|
1469
|
-
expected: "(
|
1441
|
+
expected: "(ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IOpenId | ISwaggerSecurityScheme.IOAuth2)",
|
1470
1442
|
value: input
|
1471
1443
|
});
|
1472
1444
|
})();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MigrateApplication.js","sourceRoot":"","sources":["../src/MigrateApplication.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,iEAA8D;AAC9D,2DAAwD;AACxD,yDAAsD;AAEtD,6EAA0E;AAC1E,+EAA4E;AAI5E,MAAa,kBAAkB;IAG7B,YAAmB,OAAiB;QAClC,IAAI,CAAC,OAAO
|
1
|
+
{"version":3,"file":"MigrateAp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AM,OAAO,GAAoB,iCAAe,CAAC,OAAO,CAAC;YACvD,IAAI,EAAE,KAAK;YACX,QAAQ;YACR,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,IAAI,GAAG,EAAE;SACtB,CAAC,CAAC;QACH,OAAO;YACL,OAAO;YACP,KAAK,EAAE,CAAC,GAAG,2BAAY,EAAE,GAAG,2CAAoB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SACjE,CAAC;IACJ,CAAC;CACF;AApCD,gDAoCC"}
|
@@ -50,7 +50,7 @@ exports.NEST_TEMPLATE = [
|
|
50
50
|
{
|
51
51
|
"location": "",
|
52
52
|
"file": "package.json",
|
53
|
-
"content": "{\r\n \"private\": true,\r\n \"name\": \"@ORGANIZATION/PROJECT\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"Starter kit of Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"scripts\": {\r\n \"test\": \"node bin/test\",\r\n \"test:webpack\": \"npm run webpack && node bin/test/webpack.js\",\r\n \"------------------------BUILDS------------------------\": \"\",\r\n \"build\": \"npm run build:sdk && npm run build:main && npm run build:test\",\r\n \"build:api\": \"rimraf packages/api/lib && npm run build:sdk && tsc -p packages/api/tsconfig.json\",\r\n \"build:main\": \"rimraf lib && tsc\",\r\n \"build:sdk\": \"rimraf src/api/functional && nestia sdk\",\r\n \"build:swagger\": \"npx nestia swagger\",\r\n \"build:test\": \"rimraf bin && tsc -p test/tsconfig.json\",\r\n \"dev\": \"npm run build:test -- --watch\",\r\n \"eslint\": \"eslint src && eslint test\",\r\n \"eslint:fix\": \"eslint --fix src && eslint --fix test\",\r\n \"prepare\": \"ts-patch install && typia patch\",\r\n \"prettier\": \"prettier src --write && prettier test --write\",\r\n \"------------------------WEBPACK------------------------\": \"\",\r\n \"webpack\": \"rimraf dist && webpack\",\r\n \"webpack:start\": \"cd dist && node dist/server\",\r\n \"------------------------DEPLOYS------------------------\": \"\",\r\n \"package:api\": \"npm run build:swagger && npm run build:api && cd packages/api && npm publish\",\r\n \"start\": \"node lib/executable/server\",\r\n \"start:swagger\": \"ts-node src/executable/swagger.ts\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia-start\"\r\n },\r\n \"keywords\": [\r\n \"nestia\",\r\n \"template\",\r\n \"boilerplate\"\r\n ],\r\n \"author\": \"AUTHOR\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia-start/issues\"\r\n },\r\n \"homepage\": \"https://github.com/samchon/nestia-start#readme\",\r\n \"devDependencies\": {\r\n \"@nestia/e2e\": \"^0.4.1\",\r\n \"@nestia/sdk\": \"^2.5.
|
53
|
+
"content": "{\r\n \"private\": true,\r\n \"name\": \"@ORGANIZATION/PROJECT\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"Starter kit of Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"scripts\": {\r\n \"test\": \"node bin/test\",\r\n \"test:webpack\": \"npm run webpack && node bin/test/webpack.js\",\r\n \"------------------------BUILDS------------------------\": \"\",\r\n \"build\": \"npm run build:sdk && npm run build:main && npm run build:test\",\r\n \"build:api\": \"rimraf packages/api/lib && npm run build:sdk && tsc -p packages/api/tsconfig.json\",\r\n \"build:main\": \"rimraf lib && tsc\",\r\n \"build:sdk\": \"rimraf src/api/functional && nestia sdk\",\r\n \"build:swagger\": \"npx nestia swagger\",\r\n \"build:test\": \"rimraf bin && tsc -p test/tsconfig.json\",\r\n \"dev\": \"npm run build:test -- --watch\",\r\n \"eslint\": \"eslint src && eslint test\",\r\n \"eslint:fix\": \"eslint --fix src && eslint --fix test\",\r\n \"prepare\": \"ts-patch install && typia patch\",\r\n \"prettier\": \"prettier src --write && prettier test --write\",\r\n \"------------------------WEBPACK------------------------\": \"\",\r\n \"webpack\": \"rimraf dist && webpack\",\r\n \"webpack:start\": \"cd dist && node dist/server\",\r\n \"------------------------DEPLOYS------------------------\": \"\",\r\n \"package:api\": \"npm run build:swagger && npm run build:api && cd packages/api && npm publish\",\r\n \"start\": \"node lib/executable/server\",\r\n \"start:swagger\": \"ts-node src/executable/swagger.ts\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia-start\"\r\n },\r\n \"keywords\": [\r\n \"nestia\",\r\n \"template\",\r\n \"boilerplate\"\r\n ],\r\n \"author\": \"AUTHOR\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia-start/issues\"\r\n },\r\n \"homepage\": \"https://github.com/samchon/nestia-start#readme\",\r\n \"devDependencies\": {\r\n \"@nestia/e2e\": \"^0.4.1\",\r\n \"@nestia/sdk\": \"^2.5.5\",\r\n \"@trivago/prettier-plugin-sort-imports\": \"^4.3.0\",\r\n \"@types/cli\": \"^0.11.21\",\r\n \"@types/express\": \"^4.17.21\",\r\n \"@types/inquirer\": \"^8.2.5\",\r\n \"@types/node\": \"^18.11.0\",\r\n \"@types/uuid\": \"^8.3.4\",\r\n \"@typescript-eslint/eslint-plugin\": \"^6.19.1\",\r\n \"@typescript-eslint/parser\": \"^6.19.1\",\r\n \"chalk\": \"^4.1.0\",\r\n \"cli\": \"^1.0.1\",\r\n \"copy-webpack-plugin\": \"^11.0.0\",\r\n \"eslint-plugin-deprecation\": \"^2.0.0\",\r\n \"express\": \"^4.18.2\",\r\n \"nestia\": \"^5.2.2\",\r\n \"prettier\": \"^3.2.4\",\r\n \"prettier-plugin-prisma\": \"^5.0.0\",\r\n \"rimraf\": \"^3.0.2\",\r\n \"source-map-support\": \"^0.5.21\",\r\n \"swagger-ui-express\": \"^5.0.0\",\r\n \"ts-loader\": \"^9.5.1\",\r\n \"ts-node\": \"^10.9.1\",\r\n \"ts-patch\": \"^3.0.2\",\r\n \"typescript\": \"^5.3.2\",\r\n \"typescript-transform-paths\": \"^3.4.6\",\r\n \"webpack\": \"^5.89.0\",\r\n \"webpack-cli\": \"^5.1.4\",\r\n \"write-file-webpack-plugin\": \"^4.5.1\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/core\": \"^2.5.5\",\r\n \"@nestia/fetcher\": \"^2.5.5\",\r\n \"@nestjs/common\": \"^10.3.3\",\r\n \"@nestjs/core\": \"^10.3.3\",\r\n \"@nestjs/platform-express\": \"^10.3.3\",\r\n \"commander\": \"10.0.0\",\r\n \"dotenv\": \"^16.3.1\",\r\n \"dotenv-expand\": \"^10.0.0\",\r\n \"inquirer\": \"8.2.5\",\r\n \"serialize-error\": \"^4.1.0\",\r\n \"tstl\": \"^2.5.13\",\r\n \"typia\": \"^5.4.7\",\r\n \"uuid\": \"^9.0.0\"\r\n },\r\n \"stackblitz\": {\r\n \"startCommand\": \"npm run prepare && npm run build:test && npm run test\"\r\n }\r\n}"
|
54
54
|
},
|
55
55
|
{
|
56
56
|
"location": "packages/api",
|
@@ -65,7 +65,7 @@ exports.NEST_TEMPLATE = [
|
|
65
65
|
{
|
66
66
|
"location": "packages/api",
|
67
67
|
"file": "package.json",
|
68
|
-
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"SDK library generated by Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"typings\": \"lib/index.d.ts\",\r\n \"scripts\": {\r\n \"build\": \"npm run build:sdk && npm run compile\",\r\n \"build:sdk\": \"rimraf ../../src/api/functional && cd ../.. && npx nestia sdk && cd packages/api\",\r\n \"compile\": \"rimraf lib && tsc\",\r\n \"deploy\": \"npm run build && npm publish\",\r\n \"prepare\": \"ts-patch install && typia patch\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia\"\r\n },\r\n \"author\": \"Jeongho Nam\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia/issues\"\r\n },\r\n \"homepage\": \"https://nestia.io\",\r\n \"files\": [\r\n \"lib\",\r\n \"swagger.json\",\r\n \"package.json\",\r\n \"README.md\"\r\n ],\r\n \"devDependencies\": {\r\n \"rimraf\": \"^5.0.5\",\r\n \"ts-node\": \"^10.9.2\",\r\n \"ts-patch\": \"^3.1.2\",\r\n \"typescript\": \"^5.3.3\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/fetcher\": \"^2.5.
|
68
|
+
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"SDK library generated by Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"typings\": \"lib/index.d.ts\",\r\n \"scripts\": {\r\n \"build\": \"npm run build:sdk && npm run compile\",\r\n \"build:sdk\": \"rimraf ../../src/api/functional && cd ../.. && npx nestia sdk && cd packages/api\",\r\n \"compile\": \"rimraf lib && tsc\",\r\n \"deploy\": \"npm run build && npm publish\",\r\n \"prepare\": \"ts-patch install && typia patch\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia\"\r\n },\r\n \"author\": \"Jeongho Nam\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia/issues\"\r\n },\r\n \"homepage\": \"https://nestia.io\",\r\n \"files\": [\r\n \"lib\",\r\n \"swagger.json\",\r\n \"package.json\",\r\n \"README.md\"\r\n ],\r\n \"devDependencies\": {\r\n \"rimraf\": \"^5.0.5\",\r\n \"ts-node\": \"^10.9.2\",\r\n \"ts-patch\": \"^3.1.2\",\r\n \"typescript\": \"^5.3.3\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/fetcher\": \"^2.5.5\",\r\n \"typia\": \"^5.4.8\"\r\n }\r\n}"
|
69
69
|
},
|
70
70
|
{
|
71
71
|
"location": "packages/api",
|
@@ -15,7 +15,7 @@ exports.SDK_TEMPLATE = [
|
|
15
15
|
{
|
16
16
|
"location": "",
|
17
17
|
"file": "package.json",
|
18
|
-
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"SDK library generated by Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"typings\": \"lib/index.d.ts\",\r\n \"scripts\": {\r\n \"build\": \"rimraf lib && tsc\",\r\n \"prepare\": \"ts-patch install && typia patch\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia\"\r\n },\r\n \"author\": \"Jeongho Nam\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia/issues\"\r\n },\r\n \"homepage\": \"https://nestia.io\",\r\n \"files\": [\r\n \"lib\",\r\n \"swagger.json\",\r\n \"package.json\",\r\n \"README.md\"\r\n ],\r\n \"devDependencies\": {\r\n \"rimraf\": \"^5.0.5\",\r\n \"ts-node\": \"^10.9.2\",\r\n \"ts-patch\": \"^3.1.2\",\r\n \"typescript\": \"^5.3.3\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/fetcher\": \"^2.5.4\",\r\n \"typia\": \"^5.4.
|
18
|
+
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"SDK library generated by Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"typings\": \"lib/index.d.ts\",\r\n \"scripts\": {\r\n \"build\": \"rimraf lib && tsc\",\r\n \"prepare\": \"ts-patch install && typia patch\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia\"\r\n },\r\n \"author\": \"Jeongho Nam\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia/issues\"\r\n },\r\n \"homepage\": \"https://nestia.io\",\r\n \"files\": [\r\n \"lib\",\r\n \"swagger.json\",\r\n \"package.json\",\r\n \"README.md\"\r\n ],\r\n \"devDependencies\": {\r\n \"rimraf\": \"^5.0.5\",\r\n \"ts-node\": \"^10.9.2\",\r\n \"ts-patch\": \"^3.1.2\",\r\n \"typescript\": \"^5.3.3\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/fetcher\": \"^2.5.4\",\r\n \"typia\": \"^5.4.8\"\r\n }\r\n}"
|
19
19
|
},
|
20
20
|
{
|
21
21
|
"location": "",
|
package/lib/module.d.ts
CHANGED
@@ -5,7 +5,7 @@ export * from "./structures/ISwagger";
|
|
5
5
|
export * from "./structures/ISwaggerComponents";
|
6
6
|
export * from "./structures/ISwaggerInfo";
|
7
7
|
export * from "./structures/ISwaggerRoute";
|
8
|
-
export * from "./structures/
|
8
|
+
export * from "./structures/ISwaggerSecurityScheme";
|
9
9
|
export * from "./structures/ISwaggerSchema";
|
10
10
|
export * from "./structures/IMigrateProgram";
|
11
11
|
export * from "./structures/IMigrateSchema";
|
package/lib/module.js
CHANGED
@@ -21,7 +21,7 @@ __exportStar(require("./structures/ISwagger"), exports);
|
|
21
21
|
__exportStar(require("./structures/ISwaggerComponents"), exports);
|
22
22
|
__exportStar(require("./structures/ISwaggerInfo"), exports);
|
23
23
|
__exportStar(require("./structures/ISwaggerRoute"), exports);
|
24
|
-
__exportStar(require("./structures/
|
24
|
+
__exportStar(require("./structures/ISwaggerSecurityScheme"), exports);
|
25
25
|
__exportStar(require("./structures/ISwaggerSchema"), exports);
|
26
26
|
__exportStar(require("./structures/IMigrateProgram"), exports);
|
27
27
|
__exportStar(require("./structures/IMigrateSchema"), exports);
|
package/lib/module.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AAErC,8DAA4C;AAE5C,kEAAgD;AAEhD,wDAAsC;AACtC,kEAAgD;AAChD,4DAA0C;AAC1C,6DAA2C;AAC3C,
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AAErC,8DAA4C;AAE5C,kEAAgD;AAEhD,wDAAsC;AACtC,kEAAgD;AAChD,4DAA0C;AAC1C,6DAA2C;AAC3C,sEAAoD;AACpD,8DAA4C;AAC5C,+DAA6C;AAC7C,8DAA4C"}
|
@@ -13,28 +13,28 @@ const MigrateApiNamespaceProgrammer_1 = require("./MigrateApiNamespaceProgrammer
|
|
13
13
|
const MigrateSchemaProgrammer_1 = require("./MigrateSchemaProgrammer");
|
14
14
|
var MigrateApiSimulatationProgrammer;
|
15
15
|
(function (MigrateApiSimulatationProgrammer) {
|
16
|
-
MigrateApiSimulatationProgrammer.random = (components) => (importer) => (props) =>
|
17
|
-
|
18
|
-
typescript_1.default.factory.createTypeReferenceNode(`${importer.external({
|
19
|
-
type: "default",
|
20
|
-
library: "typia",
|
21
|
-
name: "typia",
|
22
|
-
})}.IRandomGenerator`),
|
23
|
-
])),
|
24
|
-
], undefined, undefined, typescript_1.default.factory.createCallExpression(IdentifierFactory_1.IdentifierFactory.access(typescript_1.default.factory.createIdentifier(importer.external({
|
25
|
-
type: "default",
|
26
|
-
library: "typia",
|
27
|
-
name: "typia",
|
28
|
-
})))("random"), [
|
29
|
-
props.route.success
|
16
|
+
MigrateApiSimulatationProgrammer.random = (components) => (importer) => (props) => {
|
17
|
+
const output = props.route.success
|
30
18
|
? MigrateSchemaProgrammer_1.MigrateSchemaProgrammer.write(components)(importer)(props.route.success.schema)
|
31
|
-
: TypeFactory_1.TypeFactory.keyword("void")
|
32
|
-
|
19
|
+
: TypeFactory_1.TypeFactory.keyword("void");
|
20
|
+
return constant("random")(typescript_1.default.factory.createArrowFunction(undefined, undefined, [
|
21
|
+
typescript_1.default.factory.createParameterDeclaration(undefined, undefined, "g", typescript_1.default.factory.createToken(typescript_1.default.SyntaxKind.QuestionToken), typescript_1.default.factory.createTypeReferenceNode(typescript_1.default.factory.createIdentifier("Partial"), [
|
22
|
+
typescript_1.default.factory.createTypeReferenceNode(`${importer.external({
|
23
|
+
type: "default",
|
24
|
+
library: "typia",
|
25
|
+
name: "typia",
|
26
|
+
})}.IRandomGenerator`),
|
27
|
+
])),
|
28
|
+
], output, undefined, typescript_1.default.factory.createCallExpression(IdentifierFactory_1.IdentifierFactory.access(typescript_1.default.factory.createIdentifier(importer.external({
|
29
|
+
type: "default",
|
30
|
+
library: "typia",
|
31
|
+
name: "typia",
|
32
|
+
})))("random"), [output], [typescript_1.default.factory.createIdentifier("g")])));
|
33
|
+
};
|
33
34
|
MigrateApiSimulatationProgrammer.simulate = (components) => (importer) => (props) => {
|
34
35
|
const caller = () => typescript_1.default.factory.createCallExpression(typescript_1.default.factory.createIdentifier("random"), undefined, [
|
35
36
|
typescript_1.default.factory.createConditionalExpression(typescript_1.default.factory.createLogicalAnd(typescript_1.default.factory.createStrictEquality(typescript_1.default.factory.createStringLiteral("object"), typescript_1.default.factory.createTypeOfExpression(typescript_1.default.factory.createIdentifier("connection.simulate"))), typescript_1.default.factory.createStrictInequality(typescript_1.default.factory.createNull(), typescript_1.default.factory.createIdentifier("connection.simulate"))), undefined, typescript_1.default.factory.createIdentifier("connection.simulate"), undefined, typescript_1.default.factory.createIdentifier("undefined")),
|
36
37
|
]);
|
37
|
-
assert;
|
38
38
|
return constant("simulate")(typescript_1.default.factory.createArrowFunction(undefined, undefined, MigrateApiFunctionProgrammer_1.MigrateApiFunctionProgrammer.writeParameterDeclarations(components)(importer)(props), typescript_1.default.factory.createTypeReferenceNode(props.route.success ? "Output" : "void"), undefined, typescript_1.default.factory.createBlock([
|
39
39
|
...assert(components)(importer)(props),
|
40
40
|
typescript_1.default.factory.createReturnStatement(caller()),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MigrateApiSimulatationProgrammer.js","sourceRoot":"","sources":["../../src/programmers/MigrateApiSimulatationProgrammer.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAC5B,6EAA0E;AAC1E,2EAAwE;AACxE,iEAA8D;AAK9D,iFAA8E;AAC9E,mFAAgF;AAEhF,uEAAoE;AAEpE,IAAiB,gCAAgC,
|
1
|
+
{"version":3,"file":"MigrateApiSimulatationProgrammer.js","sourceRoot":"","sources":["../../src/programmers/MigrateApiSimulatationProgrammer.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAC5B,6EAA0E;AAC1E,2EAAwE;AACxE,iEAA8D;AAK9D,iFAA8E;AAC9E,mFAAgF;AAEhF,uEAAoE;AAEpE,IAAiB,gCAAgC,CAyShD;AAzSD,WAAiB,gCAAgC;IAMlC,uCAAM,GACjB,CAAC,UAA8B,EAAE,EAAE,CACnC,CAAC,QAAiC,EAAE,EAAE,CACtC,CAAC,KAAa,EAAE,EAAE;QAChB,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO;YAChC,CAAC,CAAC,iDAAuB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CACjD,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAC3B;YACH,CAAC,CAAC,yBAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAChC,OAAO,QAAQ,CAAC,QAAQ,CAAC,CACvB,oBAAE,CAAC,OAAO,CAAC,mBAAmB,CAC5B,SAAS,EACT,SAAS,EACT;YACE,oBAAE,CAAC,OAAO,CAAC,0BAA0B,CACnC,SAAS,EACT,SAAS,EACT,GAAG,EACH,oBAAE,CAAC,OAAO,CAAC,WAAW,CAAC,oBAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EACnD,oBAAE,CAAC,OAAO,CAAC,uBAAuB,CAChC,oBAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,SAAS,CAAC,EACtC;gBACE,oBAAE,CAAC,OAAO,CAAC,uBAAuB,CAChC,GAAG,QAAQ,CAAC,QAAQ,CAAC;oBACnB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE,OAAO;oBAChB,IAAI,EAAE,OAAO;iBACd,CAAC,mBAAmB,CACtB;aACF,CACF,CACF;SACF,EACD,MAAM,EACN,SAAS,EACT,oBAAE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
|
2
|
-
import {
|
2
|
+
import { ISwaggerSecurityScheme } from "./ISwaggerSecurityScheme";
|
3
3
|
export interface ISwaggerComponents {
|
4
4
|
schemas?: Record<string, ISwaggerSchema>;
|
5
|
-
securitySchemes?: Record<string,
|
5
|
+
securitySchemes?: Record<string, ISwaggerSecurityScheme>;
|
6
6
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export type
|
2
|
-
export declare namespace
|
1
|
+
export type ISwaggerSecurityScheme = ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IOpenId | ISwaggerSecurityScheme.IOAuth2;
|
2
|
+
export declare namespace ISwaggerSecurityScheme {
|
3
3
|
interface IHttpBasic {
|
4
4
|
type: "http";
|
5
5
|
scheme: "basic";
|
@@ -11,8 +11,8 @@ export declare namespace ISwaggerSecurity {
|
|
11
11
|
}
|
12
12
|
interface IApiKey {
|
13
13
|
type: "apiKey";
|
14
|
-
in
|
15
|
-
name
|
14
|
+
in?: "header" | "query" | "cookie";
|
15
|
+
name?: string;
|
16
16
|
}
|
17
17
|
interface IOpenId {
|
18
18
|
type: "openIdConnect";
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ISwaggerSecurityScheme.js","sourceRoot":"","sources":["../../src/structures/ISwaggerSecurityScheme.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nestia/migrate",
|
3
|
-
"version": "0.7.
|
3
|
+
"version": "0.7.11",
|
4
4
|
"description": "Migration program from swagger to NestJS",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"typings": "lib/index.d.ts",
|
@@ -31,12 +31,12 @@
|
|
31
31
|
},
|
32
32
|
"homepage": "https://nestia.io",
|
33
33
|
"devDependencies": {
|
34
|
-
"@nestia/core": "2.5.
|
35
|
-
"@nestia/fetcher": "2.5.
|
36
|
-
"@nestjs/common": "^10.3.
|
37
|
-
"@nestjs/core": "^10.3.
|
38
|
-
"@nestjs/platform-express": "^10.3.
|
39
|
-
"@nestjs/platform-fastify": "^10.3.
|
34
|
+
"@nestia/core": "2.5.5",
|
35
|
+
"@nestia/fetcher": "2.5.5",
|
36
|
+
"@nestjs/common": "^10.3.3",
|
37
|
+
"@nestjs/core": "^10.3.3",
|
38
|
+
"@nestjs/platform-express": "^10.3.3",
|
39
|
+
"@nestjs/platform-fastify": "^10.3.3",
|
40
40
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
41
41
|
"@types/express": "^4.17.21",
|
42
42
|
"@types/inquirer": "^9.0.7",
|
@@ -56,7 +56,7 @@
|
|
56
56
|
"inquirer": "8.2.5",
|
57
57
|
"prettier": "^3.2.5",
|
58
58
|
"typescript": "^5.3.3",
|
59
|
-
"typia": "^5.4.
|
59
|
+
"typia": "^5.4.8"
|
60
60
|
},
|
61
61
|
"files": [
|
62
62
|
"lib",
|
@@ -47,7 +47,7 @@ export const NEST_TEMPLATE = [
|
|
47
47
|
{
|
48
48
|
"location": "",
|
49
49
|
"file": "package.json",
|
50
|
-
"content": "{\r\n \"private\": true,\r\n \"name\": \"@ORGANIZATION/PROJECT\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"Starter kit of Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"scripts\": {\r\n \"test\": \"node bin/test\",\r\n \"test:webpack\": \"npm run webpack && node bin/test/webpack.js\",\r\n \"------------------------BUILDS------------------------\": \"\",\r\n \"build\": \"npm run build:sdk && npm run build:main && npm run build:test\",\r\n \"build:api\": \"rimraf packages/api/lib && npm run build:sdk && tsc -p packages/api/tsconfig.json\",\r\n \"build:main\": \"rimraf lib && tsc\",\r\n \"build:sdk\": \"rimraf src/api/functional && nestia sdk\",\r\n \"build:swagger\": \"npx nestia swagger\",\r\n \"build:test\": \"rimraf bin && tsc -p test/tsconfig.json\",\r\n \"dev\": \"npm run build:test -- --watch\",\r\n \"eslint\": \"eslint src && eslint test\",\r\n \"eslint:fix\": \"eslint --fix src && eslint --fix test\",\r\n \"prepare\": \"ts-patch install && typia patch\",\r\n \"prettier\": \"prettier src --write && prettier test --write\",\r\n \"------------------------WEBPACK------------------------\": \"\",\r\n \"webpack\": \"rimraf dist && webpack\",\r\n \"webpack:start\": \"cd dist && node dist/server\",\r\n \"------------------------DEPLOYS------------------------\": \"\",\r\n \"package:api\": \"npm run build:swagger && npm run build:api && cd packages/api && npm publish\",\r\n \"start\": \"node lib/executable/server\",\r\n \"start:swagger\": \"ts-node src/executable/swagger.ts\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia-start\"\r\n },\r\n \"keywords\": [\r\n \"nestia\",\r\n \"template\",\r\n \"boilerplate\"\r\n ],\r\n \"author\": \"AUTHOR\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia-start/issues\"\r\n },\r\n \"homepage\": \"https://github.com/samchon/nestia-start#readme\",\r\n \"devDependencies\": {\r\n \"@nestia/e2e\": \"^0.4.1\",\r\n \"@nestia/sdk\": \"^2.5.
|
50
|
+
"content": "{\r\n \"private\": true,\r\n \"name\": \"@ORGANIZATION/PROJECT\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"Starter kit of Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"scripts\": {\r\n \"test\": \"node bin/test\",\r\n \"test:webpack\": \"npm run webpack && node bin/test/webpack.js\",\r\n \"------------------------BUILDS------------------------\": \"\",\r\n \"build\": \"npm run build:sdk && npm run build:main && npm run build:test\",\r\n \"build:api\": \"rimraf packages/api/lib && npm run build:sdk && tsc -p packages/api/tsconfig.json\",\r\n \"build:main\": \"rimraf lib && tsc\",\r\n \"build:sdk\": \"rimraf src/api/functional && nestia sdk\",\r\n \"build:swagger\": \"npx nestia swagger\",\r\n \"build:test\": \"rimraf bin && tsc -p test/tsconfig.json\",\r\n \"dev\": \"npm run build:test -- --watch\",\r\n \"eslint\": \"eslint src && eslint test\",\r\n \"eslint:fix\": \"eslint --fix src && eslint --fix test\",\r\n \"prepare\": \"ts-patch install && typia patch\",\r\n \"prettier\": \"prettier src --write && prettier test --write\",\r\n \"------------------------WEBPACK------------------------\": \"\",\r\n \"webpack\": \"rimraf dist && webpack\",\r\n \"webpack:start\": \"cd dist && node dist/server\",\r\n \"------------------------DEPLOYS------------------------\": \"\",\r\n \"package:api\": \"npm run build:swagger && npm run build:api && cd packages/api && npm publish\",\r\n \"start\": \"node lib/executable/server\",\r\n \"start:swagger\": \"ts-node src/executable/swagger.ts\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia-start\"\r\n },\r\n \"keywords\": [\r\n \"nestia\",\r\n \"template\",\r\n \"boilerplate\"\r\n ],\r\n \"author\": \"AUTHOR\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia-start/issues\"\r\n },\r\n \"homepage\": \"https://github.com/samchon/nestia-start#readme\",\r\n \"devDependencies\": {\r\n \"@nestia/e2e\": \"^0.4.1\",\r\n \"@nestia/sdk\": \"^2.5.5\",\r\n \"@trivago/prettier-plugin-sort-imports\": \"^4.3.0\",\r\n \"@types/cli\": \"^0.11.21\",\r\n \"@types/express\": \"^4.17.21\",\r\n \"@types/inquirer\": \"^8.2.5\",\r\n \"@types/node\": \"^18.11.0\",\r\n \"@types/uuid\": \"^8.3.4\",\r\n \"@typescript-eslint/eslint-plugin\": \"^6.19.1\",\r\n \"@typescript-eslint/parser\": \"^6.19.1\",\r\n \"chalk\": \"^4.1.0\",\r\n \"cli\": \"^1.0.1\",\r\n \"copy-webpack-plugin\": \"^11.0.0\",\r\n \"eslint-plugin-deprecation\": \"^2.0.0\",\r\n \"express\": \"^4.18.2\",\r\n \"nestia\": \"^5.2.2\",\r\n \"prettier\": \"^3.2.4\",\r\n \"prettier-plugin-prisma\": \"^5.0.0\",\r\n \"rimraf\": \"^3.0.2\",\r\n \"source-map-support\": \"^0.5.21\",\r\n \"swagger-ui-express\": \"^5.0.0\",\r\n \"ts-loader\": \"^9.5.1\",\r\n \"ts-node\": \"^10.9.1\",\r\n \"ts-patch\": \"^3.0.2\",\r\n \"typescript\": \"^5.3.2\",\r\n \"typescript-transform-paths\": \"^3.4.6\",\r\n \"webpack\": \"^5.89.0\",\r\n \"webpack-cli\": \"^5.1.4\",\r\n \"write-file-webpack-plugin\": \"^4.5.1\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/core\": \"^2.5.5\",\r\n \"@nestia/fetcher\": \"^2.5.5\",\r\n \"@nestjs/common\": \"^10.3.3\",\r\n \"@nestjs/core\": \"^10.3.3\",\r\n \"@nestjs/platform-express\": \"^10.3.3\",\r\n \"commander\": \"10.0.0\",\r\n \"dotenv\": \"^16.3.1\",\r\n \"dotenv-expand\": \"^10.0.0\",\r\n \"inquirer\": \"8.2.5\",\r\n \"serialize-error\": \"^4.1.0\",\r\n \"tstl\": \"^2.5.13\",\r\n \"typia\": \"^5.4.7\",\r\n \"uuid\": \"^9.0.0\"\r\n },\r\n \"stackblitz\": {\r\n \"startCommand\": \"npm run prepare && npm run build:test && npm run test\"\r\n }\r\n}"
|
51
51
|
},
|
52
52
|
{
|
53
53
|
"location": "packages/api",
|
@@ -62,7 +62,7 @@ export const NEST_TEMPLATE = [
|
|
62
62
|
{
|
63
63
|
"location": "packages/api",
|
64
64
|
"file": "package.json",
|
65
|
-
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"SDK library generated by Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"typings\": \"lib/index.d.ts\",\r\n \"scripts\": {\r\n \"build\": \"npm run build:sdk && npm run compile\",\r\n \"build:sdk\": \"rimraf ../../src/api/functional && cd ../.. && npx nestia sdk && cd packages/api\",\r\n \"compile\": \"rimraf lib && tsc\",\r\n \"deploy\": \"npm run build && npm publish\",\r\n \"prepare\": \"ts-patch install && typia patch\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia\"\r\n },\r\n \"author\": \"Jeongho Nam\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia/issues\"\r\n },\r\n \"homepage\": \"https://nestia.io\",\r\n \"files\": [\r\n \"lib\",\r\n \"swagger.json\",\r\n \"package.json\",\r\n \"README.md\"\r\n ],\r\n \"devDependencies\": {\r\n \"rimraf\": \"^5.0.5\",\r\n \"ts-node\": \"^10.9.2\",\r\n \"ts-patch\": \"^3.1.2\",\r\n \"typescript\": \"^5.3.3\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/fetcher\": \"^2.5.
|
65
|
+
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"SDK library generated by Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"typings\": \"lib/index.d.ts\",\r\n \"scripts\": {\r\n \"build\": \"npm run build:sdk && npm run compile\",\r\n \"build:sdk\": \"rimraf ../../src/api/functional && cd ../.. && npx nestia sdk && cd packages/api\",\r\n \"compile\": \"rimraf lib && tsc\",\r\n \"deploy\": \"npm run build && npm publish\",\r\n \"prepare\": \"ts-patch install && typia patch\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia\"\r\n },\r\n \"author\": \"Jeongho Nam\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia/issues\"\r\n },\r\n \"homepage\": \"https://nestia.io\",\r\n \"files\": [\r\n \"lib\",\r\n \"swagger.json\",\r\n \"package.json\",\r\n \"README.md\"\r\n ],\r\n \"devDependencies\": {\r\n \"rimraf\": \"^5.0.5\",\r\n \"ts-node\": \"^10.9.2\",\r\n \"ts-patch\": \"^3.1.2\",\r\n \"typescript\": \"^5.3.3\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/fetcher\": \"^2.5.5\",\r\n \"typia\": \"^5.4.8\"\r\n }\r\n}"
|
66
66
|
},
|
67
67
|
{
|
68
68
|
"location": "packages/api",
|
@@ -12,7 +12,7 @@ export const SDK_TEMPLATE = [
|
|
12
12
|
{
|
13
13
|
"location": "",
|
14
14
|
"file": "package.json",
|
15
|
-
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"SDK library generated by Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"typings\": \"lib/index.d.ts\",\r\n \"scripts\": {\r\n \"build\": \"rimraf lib && tsc\",\r\n \"prepare\": \"ts-patch install && typia patch\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia\"\r\n },\r\n \"author\": \"Jeongho Nam\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia/issues\"\r\n },\r\n \"homepage\": \"https://nestia.io\",\r\n \"files\": [\r\n \"lib\",\r\n \"swagger.json\",\r\n \"package.json\",\r\n \"README.md\"\r\n ],\r\n \"devDependencies\": {\r\n \"rimraf\": \"^5.0.5\",\r\n \"ts-node\": \"^10.9.2\",\r\n \"ts-patch\": \"^3.1.2\",\r\n \"typescript\": \"^5.3.3\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/fetcher\": \"^2.5.4\",\r\n \"typia\": \"^5.4.
|
15
|
+
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"SDK library generated by Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"typings\": \"lib/index.d.ts\",\r\n \"scripts\": {\r\n \"build\": \"rimraf lib && tsc\",\r\n \"prepare\": \"ts-patch install && typia patch\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia\"\r\n },\r\n \"author\": \"Jeongho Nam\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia/issues\"\r\n },\r\n \"homepage\": \"https://nestia.io\",\r\n \"files\": [\r\n \"lib\",\r\n \"swagger.json\",\r\n \"package.json\",\r\n \"README.md\"\r\n ],\r\n \"devDependencies\": {\r\n \"rimraf\": \"^5.0.5\",\r\n \"ts-node\": \"^10.9.2\",\r\n \"ts-patch\": \"^3.1.2\",\r\n \"typescript\": \"^5.3.3\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/fetcher\": \"^2.5.4\",\r\n \"typia\": \"^5.4.8\"\r\n }\r\n}"
|
16
16
|
},
|
17
17
|
{
|
18
18
|
"location": "",
|
package/src/module.ts
CHANGED
@@ -8,7 +8,7 @@ export * from "./structures/ISwagger";
|
|
8
8
|
export * from "./structures/ISwaggerComponents";
|
9
9
|
export * from "./structures/ISwaggerInfo";
|
10
10
|
export * from "./structures/ISwaggerRoute";
|
11
|
-
export * from "./structures/
|
11
|
+
export * from "./structures/ISwaggerSecurityScheme";
|
12
12
|
export * from "./structures/ISwaggerSchema";
|
13
13
|
export * from "./structures/IMigrateProgram";
|
14
14
|
export * from "./structures/IMigrateSchema";
|
@@ -20,8 +20,13 @@ export namespace MigrateApiSimulatationProgrammer {
|
|
20
20
|
export const random =
|
21
21
|
(components: ISwaggerComponents) =>
|
22
22
|
(importer: MigrateImportProgrammer) =>
|
23
|
-
(props: IProps) =>
|
24
|
-
|
23
|
+
(props: IProps) => {
|
24
|
+
const output = props.route.success
|
25
|
+
? MigrateSchemaProgrammer.write(components)(importer)(
|
26
|
+
props.route.success.schema,
|
27
|
+
)
|
28
|
+
: TypeFactory.keyword("void");
|
29
|
+
return constant("random")(
|
25
30
|
ts.factory.createArrowFunction(
|
26
31
|
undefined,
|
27
32
|
undefined,
|
@@ -45,7 +50,7 @@ export namespace MigrateApiSimulatationProgrammer {
|
|
45
50
|
),
|
46
51
|
),
|
47
52
|
],
|
48
|
-
|
53
|
+
output,
|
49
54
|
undefined,
|
50
55
|
ts.factory.createCallExpression(
|
51
56
|
IdentifierFactory.access(
|
@@ -57,17 +62,12 @@ export namespace MigrateApiSimulatationProgrammer {
|
|
57
62
|
}),
|
58
63
|
),
|
59
64
|
)("random"),
|
60
|
-
[
|
61
|
-
props.route.success
|
62
|
-
? MigrateSchemaProgrammer.write(components)(importer)(
|
63
|
-
props.route.success.schema,
|
64
|
-
)
|
65
|
-
: TypeFactory.keyword("void"),
|
66
|
-
],
|
65
|
+
[output],
|
67
66
|
[ts.factory.createIdentifier("g")],
|
68
67
|
),
|
69
68
|
),
|
70
69
|
);
|
70
|
+
};
|
71
71
|
|
72
72
|
export const simulate =
|
73
73
|
(components: ISwaggerComponents) =>
|
@@ -98,7 +98,6 @@ export namespace MigrateApiSimulatationProgrammer {
|
|
98
98
|
),
|
99
99
|
],
|
100
100
|
);
|
101
|
-
assert;
|
102
101
|
return constant("simulate")(
|
103
102
|
ts.factory.createArrowFunction(
|
104
103
|
undefined,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ISwaggerSchema } from "./ISwaggerSchema";
|
2
|
-
import {
|
2
|
+
import { ISwaggerSecurityScheme } from "./ISwaggerSecurityScheme";
|
3
3
|
|
4
4
|
export interface ISwaggerComponents {
|
5
5
|
schemas?: Record<string, ISwaggerSchema>;
|
6
|
-
securitySchemes?: Record<string,
|
6
|
+
securitySchemes?: Record<string, ISwaggerSecurityScheme>;
|
7
7
|
}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
export type
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export namespace
|
1
|
+
export type ISwaggerSecurityScheme =
|
2
|
+
| ISwaggerSecurityScheme.IHttpBasic
|
3
|
+
| ISwaggerSecurityScheme.IHttpBearer
|
4
|
+
| ISwaggerSecurityScheme.IApiKey
|
5
|
+
| ISwaggerSecurityScheme.IOpenId
|
6
|
+
| ISwaggerSecurityScheme.IOAuth2;
|
7
|
+
export namespace ISwaggerSecurityScheme {
|
8
8
|
export interface IHttpBasic {
|
9
9
|
type: "http";
|
10
10
|
scheme: "basic";
|
@@ -16,8 +16,8 @@ export namespace ISwaggerSecurity {
|
|
16
16
|
}
|
17
17
|
export interface IApiKey {
|
18
18
|
type: "apiKey";
|
19
|
-
in
|
20
|
-
name
|
19
|
+
in?: "header" | "query" | "cookie";
|
20
|
+
name?: string;
|
21
21
|
}
|
22
22
|
|
23
23
|
export interface IOpenId {
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ISwaggerSecurity.js","sourceRoot":"","sources":["../../src/structures/ISwaggerSecurity.ts"],"names":[],"mappings":""}
|