@nestia/migrate 0.11.7 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/MigrateApplication.js +6 -6
- package/lib/analyzers/MigrateMethodAnalyzer.js +1 -1
- package/lib/bundles/NEST_TEMPLATE.js +2 -2
- package/lib/bundles/NEST_TEMPLATE.js.map +1 -1
- package/lib/bundles/SDK_TEMPLATE.js +1 -1
- package/lib/bundles/SDK_TEMPLATE.js.map +1 -1
- package/lib/factories/TypeLiteralFactory.d.ts +4 -0
- package/lib/factories/TypeLiteralFactory.js +33 -0
- package/lib/factories/TypeLiteralFactory.js.map +1 -0
- package/lib/programmers/MigrateImportProgrammer.d.ts +1 -1
- package/lib/programmers/MigrateImportProgrammer.js +2 -4
- package/lib/programmers/MigrateImportProgrammer.js.map +1 -1
- package/lib/programmers/MigrateSchemaProgrammer.js +92 -6
- package/lib/programmers/MigrateSchemaProgrammer.js.map +1 -1
- package/lib/structures/ISwaggerComponents.d.ts +0 -1
- package/lib/structures/ISwaggerSchema.d.ts +1 -0
- package/lib/utils/OpenApiConverter.js +6 -6
- package/package.json +6 -3
- package/src/MigrateApplication.ts +86 -86
- package/src/bundles/NEST_TEMPLATE.ts +2 -2
- package/src/bundles/SDK_TEMPLATE.ts +1 -1
- package/src/factories/TypeLiteralFactory.ts +50 -0
- package/src/programmers/MigrateImportProgrammer.ts +3 -7
- package/src/programmers/MigrateSchemaProgrammer.ts +307 -267
- package/src/structures/ISwaggerComponents.ts +13 -14
- package/src/structures/ISwaggerSchema.ts +1 -0
@@ -1,267 +1,307 @@
|
|
1
|
-
import ts from "typescript";
|
2
|
-
import
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
|
7
|
-
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
(
|
20
|
-
(
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
else if (SwaggerTypeChecker.
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
return
|
33
|
-
else if (SwaggerTypeChecker.
|
34
|
-
return
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
else if (SwaggerTypeChecker.
|
39
|
-
return
|
40
|
-
else if (SwaggerTypeChecker.
|
41
|
-
return
|
42
|
-
else if (SwaggerTypeChecker.
|
43
|
-
return
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
else if (SwaggerTypeChecker.
|
48
|
-
return writeUnion(components)(importer)(schema.
|
49
|
-
else
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
return
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
-----------------------------------------------------------
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
(
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
)
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
intersection
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
)
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
)
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
:
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
(
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
)
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
ts.factory.
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
(
|
263
|
-
|
264
|
-
:
|
265
|
-
|
266
|
-
|
267
|
-
|
1
|
+
import ts from "typescript";
|
2
|
+
import typia from "typia";
|
3
|
+
import { ExpressionFactory } from "typia/lib/factories/ExpressionFactory";
|
4
|
+
import { TypeFactory } from "typia/lib/factories/TypeFactory";
|
5
|
+
import { FormatCheatSheet } from "typia/lib/tags/internal/FormatCheatSheet";
|
6
|
+
import { Escaper } from "typia/lib/utils/Escaper";
|
7
|
+
|
8
|
+
import { ISwaggerComponents } from "../structures/ISwaggerComponents";
|
9
|
+
import { ISwaggerSchema } from "../structures/ISwaggerSchema";
|
10
|
+
import { FilePrinter } from "../utils/FilePrinter";
|
11
|
+
import { SwaggerTypeChecker } from "../utils/SwaggerTypeChecker";
|
12
|
+
import { MigrateImportProgrammer } from "./MigrateImportProgrammer";
|
13
|
+
|
14
|
+
export namespace MigrateSchemaProgrammer {
|
15
|
+
/* -----------------------------------------------------------
|
16
|
+
FACADE
|
17
|
+
----------------------------------------------------------- */
|
18
|
+
export const write =
|
19
|
+
(components: ISwaggerComponents) =>
|
20
|
+
(importer: MigrateImportProgrammer) =>
|
21
|
+
(schema: ISwaggerSchema): ts.TypeNode => {
|
22
|
+
const union: ts.TypeNode[] = [];
|
23
|
+
if (SwaggerTypeChecker.isUnknown(schema))
|
24
|
+
return TypeFactory.keyword("any");
|
25
|
+
else if (SwaggerTypeChecker.isNullOnly(schema)) return createNode("null");
|
26
|
+
else if (SwaggerTypeChecker.isNullable(components)(schema))
|
27
|
+
union.push(createNode("null"));
|
28
|
+
|
29
|
+
const type: ts.TypeNode = (() => {
|
30
|
+
// ATOMIC
|
31
|
+
if (SwaggerTypeChecker.isBoolean(schema))
|
32
|
+
return writeBoolean(importer)(schema);
|
33
|
+
else if (SwaggerTypeChecker.isInteger(schema))
|
34
|
+
return writeInteger(importer)(schema);
|
35
|
+
else if (SwaggerTypeChecker.isNumber(schema))
|
36
|
+
return writeNumber(importer)(schema);
|
37
|
+
// INSTANCES
|
38
|
+
else if (SwaggerTypeChecker.isString(schema))
|
39
|
+
return writeString(importer)(schema);
|
40
|
+
else if (SwaggerTypeChecker.isArray(schema))
|
41
|
+
return writeArray(components)(importer)(schema);
|
42
|
+
else if (SwaggerTypeChecker.isObject(schema))
|
43
|
+
return writeObject(components)(importer)(schema);
|
44
|
+
else if (SwaggerTypeChecker.isReference(schema))
|
45
|
+
return writeReference(importer)(schema);
|
46
|
+
// NESTED UNION
|
47
|
+
else if (SwaggerTypeChecker.isAnyOf(schema))
|
48
|
+
return writeUnion(components)(importer)(schema.anyOf);
|
49
|
+
else if (SwaggerTypeChecker.isOneOf(schema))
|
50
|
+
return writeUnion(components)(importer)(schema.oneOf);
|
51
|
+
else return TypeFactory.keyword("any");
|
52
|
+
})();
|
53
|
+
union.push(type);
|
54
|
+
|
55
|
+
if (union.length === 0) return TypeFactory.keyword("any");
|
56
|
+
else if (union.length === 1) return union[0];
|
57
|
+
return ts.factory.createUnionTypeNode(union);
|
58
|
+
};
|
59
|
+
|
60
|
+
/* -----------------------------------------------------------
|
61
|
+
ATOMICS
|
62
|
+
----------------------------------------------------------- */
|
63
|
+
const writeBoolean =
|
64
|
+
(importer: MigrateImportProgrammer) =>
|
65
|
+
(schema: ISwaggerSchema.IBoolean): ts.TypeNode => {
|
66
|
+
if (schema.enum?.length)
|
67
|
+
return ts.factory.createLiteralTypeNode(
|
68
|
+
schema.enum[0] ? ts.factory.createTrue() : ts.factory.createFalse(),
|
69
|
+
);
|
70
|
+
const intersection: ts.TypeNode[] = [TypeFactory.keyword("boolean")];
|
71
|
+
writePlugin({
|
72
|
+
importer,
|
73
|
+
regular: typia.misc.literals<keyof ISwaggerSchema.IBoolean>(),
|
74
|
+
intersection,
|
75
|
+
})(schema);
|
76
|
+
return intersection.length === 1
|
77
|
+
? intersection[0]
|
78
|
+
: ts.factory.createIntersectionTypeNode(intersection);
|
79
|
+
};
|
80
|
+
|
81
|
+
const writeInteger =
|
82
|
+
(importer: MigrateImportProgrammer) =>
|
83
|
+
(schema: ISwaggerSchema.IInteger): ts.TypeNode =>
|
84
|
+
writeNumeric(() => [
|
85
|
+
TypeFactory.keyword("number"),
|
86
|
+
importer.tag("Type", "int32"),
|
87
|
+
])(importer)(schema);
|
88
|
+
|
89
|
+
const writeNumber =
|
90
|
+
(importer: MigrateImportProgrammer) =>
|
91
|
+
(schema: ISwaggerSchema.INumber): ts.TypeNode =>
|
92
|
+
writeNumeric(() => [TypeFactory.keyword("number")])(importer)(schema);
|
93
|
+
|
94
|
+
const writeNumeric =
|
95
|
+
(factory: () => ts.TypeNode[]) =>
|
96
|
+
(importer: MigrateImportProgrammer) =>
|
97
|
+
(schema: ISwaggerSchema.IInteger | ISwaggerSchema.INumber): ts.TypeNode => {
|
98
|
+
if (schema.enum?.length)
|
99
|
+
return ts.factory.createUnionTypeNode(
|
100
|
+
schema.enum.map((i) =>
|
101
|
+
ts.factory.createLiteralTypeNode(ExpressionFactory.number(i)),
|
102
|
+
),
|
103
|
+
);
|
104
|
+
const intersection: ts.TypeNode[] = factory();
|
105
|
+
if (schema.default !== undefined)
|
106
|
+
intersection.push(importer.tag("Default", schema.default));
|
107
|
+
if (schema.minimum !== undefined)
|
108
|
+
intersection.push(
|
109
|
+
importer.tag(
|
110
|
+
schema.exclusiveMinimum ? "ExclusiveMinimum" : "Minimum",
|
111
|
+
schema.minimum,
|
112
|
+
),
|
113
|
+
);
|
114
|
+
if (schema.maximum !== undefined)
|
115
|
+
intersection.push(
|
116
|
+
importer.tag(
|
117
|
+
schema.exclusiveMaximum ? "ExclusiveMaximum" : "Maximum",
|
118
|
+
schema.maximum,
|
119
|
+
),
|
120
|
+
);
|
121
|
+
if (schema.multipleOf !== undefined)
|
122
|
+
intersection.push(importer.tag("MultipleOf", schema.multipleOf));
|
123
|
+
writePlugin({
|
124
|
+
importer,
|
125
|
+
regular: typia.misc.literals<keyof ISwaggerSchema.INumber>(),
|
126
|
+
intersection,
|
127
|
+
})(schema);
|
128
|
+
return intersection.length === 1
|
129
|
+
? intersection[0]
|
130
|
+
: ts.factory.createIntersectionTypeNode(intersection);
|
131
|
+
};
|
132
|
+
|
133
|
+
const writeString =
|
134
|
+
(importer: MigrateImportProgrammer) =>
|
135
|
+
(schema: ISwaggerSchema.IString): ts.TypeNode => {
|
136
|
+
if (schema.format === "binary")
|
137
|
+
return ts.factory.createTypeReferenceNode("File");
|
138
|
+
|
139
|
+
const intersection: ts.TypeNode[] = [TypeFactory.keyword("string")];
|
140
|
+
if (schema.default !== undefined)
|
141
|
+
intersection.push(importer.tag("Default", schema.default));
|
142
|
+
if (schema.minLength !== undefined)
|
143
|
+
intersection.push(importer.tag("MinLength", schema.minLength));
|
144
|
+
if (schema.maxLength !== undefined)
|
145
|
+
intersection.push(importer.tag("MaxLength", schema.maxLength));
|
146
|
+
if (schema.pattern !== undefined)
|
147
|
+
intersection.push(importer.tag("Pattern", schema.pattern));
|
148
|
+
if (
|
149
|
+
schema.format !== undefined &&
|
150
|
+
(FormatCheatSheet as Record<string, string>)[schema.format] !==
|
151
|
+
undefined
|
152
|
+
)
|
153
|
+
intersection.push(importer.tag("Format", schema.format));
|
154
|
+
if (schema.contentMediaType !== undefined)
|
155
|
+
intersection.push(
|
156
|
+
importer.tag("ContentMediaType", schema.contentMediaType),
|
157
|
+
);
|
158
|
+
writePlugin({
|
159
|
+
importer,
|
160
|
+
regular: typia.misc.literals<keyof ISwaggerSchema.IString>(),
|
161
|
+
intersection,
|
162
|
+
})(schema);
|
163
|
+
return intersection.length === 1
|
164
|
+
? intersection[0]
|
165
|
+
: ts.factory.createIntersectionTypeNode(intersection);
|
166
|
+
};
|
167
|
+
|
168
|
+
/* -----------------------------------------------------------
|
169
|
+
INSTANCES
|
170
|
+
----------------------------------------------------------- */
|
171
|
+
const writeArray =
|
172
|
+
(components: ISwaggerComponents) =>
|
173
|
+
(importer: MigrateImportProgrammer) =>
|
174
|
+
(schema: ISwaggerSchema.IArray): ts.TypeNode => {
|
175
|
+
const intersection: ts.TypeNode[] = [
|
176
|
+
ts.factory.createArrayTypeNode(
|
177
|
+
write(components)(importer)(schema.items),
|
178
|
+
),
|
179
|
+
];
|
180
|
+
if (schema.minItems !== undefined)
|
181
|
+
intersection.push(importer.tag("MinItems", schema.minItems));
|
182
|
+
if (schema.maxItems !== undefined)
|
183
|
+
intersection.push(importer.tag("MaxItems", schema.maxItems));
|
184
|
+
writePlugin({
|
185
|
+
importer,
|
186
|
+
regular: typia.misc.literals<keyof ISwaggerSchema.IArray>(),
|
187
|
+
intersection,
|
188
|
+
})(schema);
|
189
|
+
return intersection.length === 1
|
190
|
+
? intersection[0]
|
191
|
+
: ts.factory.createIntersectionTypeNode(intersection);
|
192
|
+
};
|
193
|
+
|
194
|
+
const writeObject =
|
195
|
+
(components: ISwaggerComponents) =>
|
196
|
+
(importer: MigrateImportProgrammer) =>
|
197
|
+
(schema: ISwaggerSchema.IObject): ts.TypeNode => {
|
198
|
+
const regular = () =>
|
199
|
+
ts.factory.createTypeLiteralNode(
|
200
|
+
Object.entries(schema.properties ?? []).map(([key, value]) =>
|
201
|
+
writeRegularProperty(components)(importer)(schema.required ?? [])(
|
202
|
+
key,
|
203
|
+
value,
|
204
|
+
),
|
205
|
+
),
|
206
|
+
);
|
207
|
+
const dynamic = () =>
|
208
|
+
ts.factory.createTypeLiteralNode([
|
209
|
+
writeDynamicProperty(components)(importer)(
|
210
|
+
schema.additionalProperties as ISwaggerSchema,
|
211
|
+
),
|
212
|
+
]);
|
213
|
+
return !!schema.properties?.length &&
|
214
|
+
typeof schema.additionalProperties === "object"
|
215
|
+
? ts.factory.createIntersectionTypeNode([regular(), dynamic()])
|
216
|
+
: typeof schema.additionalProperties === "object"
|
217
|
+
? dynamic()
|
218
|
+
: regular();
|
219
|
+
};
|
220
|
+
|
221
|
+
const writeRegularProperty =
|
222
|
+
(components: ISwaggerComponents) =>
|
223
|
+
(importer: MigrateImportProgrammer) =>
|
224
|
+
(required: string[]) =>
|
225
|
+
(key: string, value: ISwaggerSchema) =>
|
226
|
+
FilePrinter.description(
|
227
|
+
ts.factory.createPropertySignature(
|
228
|
+
undefined,
|
229
|
+
Escaper.variable(key)
|
230
|
+
? ts.factory.createIdentifier(key)
|
231
|
+
: ts.factory.createStringLiteral(key),
|
232
|
+
required.includes(key)
|
233
|
+
? undefined
|
234
|
+
: ts.factory.createToken(ts.SyntaxKind.QuestionToken),
|
235
|
+
write(components)(importer)(value),
|
236
|
+
),
|
237
|
+
writeComment(value),
|
238
|
+
);
|
239
|
+
|
240
|
+
const writeDynamicProperty =
|
241
|
+
(components: ISwaggerComponents) =>
|
242
|
+
(importer: MigrateImportProgrammer) =>
|
243
|
+
(value: ISwaggerSchema) =>
|
244
|
+
FilePrinter.description(
|
245
|
+
ts.factory.createIndexSignature(
|
246
|
+
undefined,
|
247
|
+
[
|
248
|
+
ts.factory.createParameterDeclaration(
|
249
|
+
undefined,
|
250
|
+
undefined,
|
251
|
+
ts.factory.createIdentifier("key"),
|
252
|
+
undefined,
|
253
|
+
TypeFactory.keyword("string"),
|
254
|
+
),
|
255
|
+
],
|
256
|
+
write(components)(importer)(value),
|
257
|
+
),
|
258
|
+
writeComment(value),
|
259
|
+
);
|
260
|
+
|
261
|
+
const writeReference =
|
262
|
+
(importer: MigrateImportProgrammer) =>
|
263
|
+
(
|
264
|
+
schema: ISwaggerSchema.IReference,
|
265
|
+
): ts.TypeReferenceNode | ts.KeywordTypeNode => {
|
266
|
+
if (schema.$ref.startsWith("#/components/schemas") === false)
|
267
|
+
return TypeFactory.keyword("any");
|
268
|
+
const name: string = schema.$ref.split("/").at(-1)!;
|
269
|
+
return name === ""
|
270
|
+
? TypeFactory.keyword("any")
|
271
|
+
: importer.dto(schema.$ref.split("/").at(-1)!);
|
272
|
+
};
|
273
|
+
|
274
|
+
/* -----------------------------------------------------------
|
275
|
+
UNIONS
|
276
|
+
----------------------------------------------------------- */
|
277
|
+
const writeUnion =
|
278
|
+
(components: ISwaggerComponents) =>
|
279
|
+
(importer: MigrateImportProgrammer) =>
|
280
|
+
(elements: ISwaggerSchema[]): ts.UnionTypeNode =>
|
281
|
+
ts.factory.createUnionTypeNode(elements.map(write(components)(importer)));
|
282
|
+
}
|
283
|
+
const createNode = (text: string) => ts.factory.createTypeReferenceNode(text);
|
284
|
+
const writeComment = (schema: ISwaggerSchema): string =>
|
285
|
+
[
|
286
|
+
...(schema.description?.length ? [schema.description] : []),
|
287
|
+
...(schema.description?.length &&
|
288
|
+
(schema.title !== undefined || schema.deprecated === true)
|
289
|
+
? [""]
|
290
|
+
: []),
|
291
|
+
...(schema.title !== undefined ? [`@title ${schema.title}`] : []),
|
292
|
+
...(schema.deprecated === true ? [`@deprecated`] : []),
|
293
|
+
].join("\n");
|
294
|
+
const writePlugin =
|
295
|
+
(props: {
|
296
|
+
importer: MigrateImportProgrammer;
|
297
|
+
regular: string[];
|
298
|
+
intersection: ts.TypeNode[];
|
299
|
+
}) =>
|
300
|
+
(schema: any) => {
|
301
|
+
const extra: any = {};
|
302
|
+
for (const [key, value] of Object.entries(schema))
|
303
|
+
if (value !== undefined && false === props.regular.includes(key))
|
304
|
+
extra[key] = value;
|
305
|
+
if (Object.keys(extra).length !== 0)
|
306
|
+
props.intersection.push(props.importer.tag("JsonSchemaPlugin", extra));
|
307
|
+
};
|
@@ -1,14 +1,13 @@
|
|
1
|
-
import { ISwaggerRouteParameter } from "./ISwaggerRouteParameter";
|
2
|
-
import { ISwaggerRouteRequestBody } from "./ISwaggerRouteRequestBody";
|
3
|
-
import { ISwaggerRouteResponse } from "./ISwaggerRouteResponse";
|
4
|
-
import { ISwaggerSchema } from "./ISwaggerSchema";
|
5
|
-
import { ISwaggerSecurityScheme } from "./ISwaggerSecurityScheme";
|
6
|
-
|
7
|
-
export interface ISwaggerComponents {
|
8
|
-
parameters?: Record<string, ISwaggerRouteParameter>;
|
9
|
-
requestBodies?: Record<string, ISwaggerRouteRequestBody>;
|
10
|
-
responses?: Record<string, ISwaggerRouteResponse>;
|
11
|
-
schemas?: Record<string, ISwaggerSchema>;
|
12
|
-
securitySchemes?: Record<string, ISwaggerSecurityScheme>;
|
13
|
-
|
14
|
-
}
|
1
|
+
import { ISwaggerRouteParameter } from "./ISwaggerRouteParameter";
|
2
|
+
import { ISwaggerRouteRequestBody } from "./ISwaggerRouteRequestBody";
|
3
|
+
import { ISwaggerRouteResponse } from "./ISwaggerRouteResponse";
|
4
|
+
import { ISwaggerSchema } from "./ISwaggerSchema";
|
5
|
+
import { ISwaggerSecurityScheme } from "./ISwaggerSecurityScheme";
|
6
|
+
|
7
|
+
export interface ISwaggerComponents {
|
8
|
+
parameters?: Record<string, ISwaggerRouteParameter>;
|
9
|
+
requestBodies?: Record<string, ISwaggerRouteRequestBody>;
|
10
|
+
responses?: Record<string, ISwaggerRouteResponse>;
|
11
|
+
schemas?: Record<string, ISwaggerSchema>;
|
12
|
+
securitySchemes?: Record<string, ISwaggerSecurityScheme>;
|
13
|
+
}
|