@nestia/sdk 2.5.4 → 2.5.5-dev.20240213
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/executable/internal/NestiaConfigLoader.js +16 -24
- package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
- package/lib/generates/SwaggerGenerator.js +2 -2
- package/lib/generates/SwaggerGenerator.js.map +1 -1
- package/lib/generates/internal/SdkSimulationProgrammer.js +10 -5
- package/lib/generates/internal/SdkSimulationProgrammer.js.map +1 -1
- package/package.json +3 -3
- package/src/analyses/ReflectAnalyzer.ts +467 -467
- package/src/generates/SwaggerGenerator.ts +2 -2
- package/src/generates/internal/SdkSimulationProgrammer.ts +12 -4
- package/src/generates/internal/SwaggerSchemaGenerator.ts +440 -440
- package/src/structures/IController.ts +92 -92
- package/src/structures/ISwaggerRoute.ts +54 -54
|
@@ -309,8 +309,8 @@ export namespace SwaggerGenerator {
|
|
|
309
309
|
const index: number = description.indexOf(".");
|
|
310
310
|
if (index <= 0) return undefined;
|
|
311
311
|
|
|
312
|
-
const
|
|
313
|
-
return
|
|
312
|
+
const str: string = description.substring(0, index).trim();
|
|
313
|
+
return str.length && str.includes("\n") === false ? str : undefined;
|
|
314
314
|
})();
|
|
315
315
|
const deprecated = route.jsDocTags.find(
|
|
316
316
|
(tag) => tag.name === "deprecated",
|
|
@@ -17,8 +17,10 @@ export namespace SdkSimulationProgrammer {
|
|
|
17
17
|
(checker: ts.TypeChecker) =>
|
|
18
18
|
(config: INestiaConfig) =>
|
|
19
19
|
(importer: ImportDictionary) =>
|
|
20
|
-
(route: IRoute): ts.VariableStatement =>
|
|
21
|
-
|
|
20
|
+
(route: IRoute): ts.VariableStatement => {
|
|
21
|
+
const output =
|
|
22
|
+
SdkAliasCollection.responseBody(checker)(config)(importer)(route);
|
|
23
|
+
return constant("random")(
|
|
22
24
|
ts.factory.createArrowFunction(
|
|
23
25
|
undefined,
|
|
24
26
|
undefined,
|
|
@@ -38,17 +40,23 @@ export namespace SdkSimulationProgrammer {
|
|
|
38
40
|
),
|
|
39
41
|
),
|
|
40
42
|
],
|
|
41
|
-
|
|
43
|
+
config.primitive === false
|
|
44
|
+
? output
|
|
45
|
+
: ts.factory.createTypeReferenceNode(
|
|
46
|
+
SdkImportWizard.Resolved(importer),
|
|
47
|
+
[output],
|
|
48
|
+
),
|
|
42
49
|
undefined,
|
|
43
50
|
ts.factory.createCallExpression(
|
|
44
51
|
IdentifierFactory.access(
|
|
45
52
|
ts.factory.createIdentifier(SdkImportWizard.typia(importer)),
|
|
46
53
|
)("random"),
|
|
47
|
-
[
|
|
54
|
+
[output],
|
|
48
55
|
[ts.factory.createIdentifier("g")],
|
|
49
56
|
),
|
|
50
57
|
),
|
|
51
58
|
);
|
|
59
|
+
};
|
|
52
60
|
|
|
53
61
|
export const simulate =
|
|
54
62
|
(config: INestiaConfig) =>
|