@nestia/sdk 2.5.4 → 2.5.5
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
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
import type { VERSION_NEUTRAL, VersionValue } from "@nestjs/common/interfaces";
|
|
2
|
-
|
|
3
|
-
import type { ParamCategory } from "./ParamCategory";
|
|
4
|
-
|
|
5
|
-
export interface IController {
|
|
6
|
-
file: string;
|
|
7
|
-
name: string;
|
|
8
|
-
prefixes: string[];
|
|
9
|
-
paths: string[];
|
|
10
|
-
versions:
|
|
11
|
-
| Array<Exclude<VersionValue, Array<string | typeof VERSION_NEUTRAL>>>
|
|
12
|
-
| undefined;
|
|
13
|
-
functions: IController.IFunction[];
|
|
14
|
-
security: Record<string, string[]>[];
|
|
15
|
-
swaggerTgas: string[];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export namespace IController {
|
|
19
|
-
export interface IFunction {
|
|
20
|
-
name: string;
|
|
21
|
-
method: string;
|
|
22
|
-
paths: string[];
|
|
23
|
-
versions:
|
|
24
|
-
| Array<Exclude<VersionValue, Array<string | typeof VERSION_NEUTRAL>>>
|
|
25
|
-
| undefined;
|
|
26
|
-
encrypted: boolean;
|
|
27
|
-
parameters: IParameter[];
|
|
28
|
-
status?: number;
|
|
29
|
-
type?: string;
|
|
30
|
-
contentType: "application/json" | "text/plain";
|
|
31
|
-
security: Record<string, string[]>[];
|
|
32
|
-
exceptions: Record<
|
|
33
|
-
number | "2XX" | "3XX" | "4XX" | "5XX",
|
|
34
|
-
IController.IException
|
|
35
|
-
>;
|
|
36
|
-
swaggerTags: string[];
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type IParameter =
|
|
40
|
-
| ICommonParameter
|
|
41
|
-
| IQueryParameter
|
|
42
|
-
| IHeadersParameter
|
|
43
|
-
| IBodyParameter
|
|
44
|
-
| IPathParameter;
|
|
45
|
-
export interface ICommonParameter {
|
|
46
|
-
custom: false;
|
|
47
|
-
category: ParamCategory;
|
|
48
|
-
index: number;
|
|
49
|
-
name: string;
|
|
50
|
-
field: string | undefined;
|
|
51
|
-
}
|
|
52
|
-
export interface IHeadersParameter {
|
|
53
|
-
custom: true;
|
|
54
|
-
category: "headers";
|
|
55
|
-
index: number;
|
|
56
|
-
name: string;
|
|
57
|
-
field: string | undefined;
|
|
58
|
-
}
|
|
59
|
-
export interface IQueryParameter {
|
|
60
|
-
custom: true;
|
|
61
|
-
category: "query";
|
|
62
|
-
index: number;
|
|
63
|
-
name: string;
|
|
64
|
-
field: string | undefined;
|
|
65
|
-
}
|
|
66
|
-
export interface IBodyParameter {
|
|
67
|
-
custom: true;
|
|
68
|
-
category: "body";
|
|
69
|
-
index: number;
|
|
70
|
-
name: string;
|
|
71
|
-
field: string | undefined;
|
|
72
|
-
encrypted: boolean;
|
|
73
|
-
contentType:
|
|
74
|
-
| "application/json"
|
|
75
|
-
| "application/x-www-form-urlencoded"
|
|
76
|
-
| "multipart/form-data"
|
|
77
|
-
| "text/plain";
|
|
78
|
-
}
|
|
79
|
-
export interface IPathParameter {
|
|
80
|
-
custom: true;
|
|
81
|
-
category: "param";
|
|
82
|
-
index: number;
|
|
83
|
-
name: string;
|
|
84
|
-
field: string | undefined;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export interface IException {
|
|
88
|
-
type: string;
|
|
89
|
-
status: number | "2XX" | "3XX" | "4XX" | "5XX";
|
|
90
|
-
description: string | undefined;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
1
|
+
import type { VERSION_NEUTRAL, VersionValue } from "@nestjs/common/interfaces";
|
|
2
|
+
|
|
3
|
+
import type { ParamCategory } from "./ParamCategory";
|
|
4
|
+
|
|
5
|
+
export interface IController {
|
|
6
|
+
file: string;
|
|
7
|
+
name: string;
|
|
8
|
+
prefixes: string[];
|
|
9
|
+
paths: string[];
|
|
10
|
+
versions:
|
|
11
|
+
| Array<Exclude<VersionValue, Array<string | typeof VERSION_NEUTRAL>>>
|
|
12
|
+
| undefined;
|
|
13
|
+
functions: IController.IFunction[];
|
|
14
|
+
security: Record<string, string[]>[];
|
|
15
|
+
swaggerTgas: string[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export namespace IController {
|
|
19
|
+
export interface IFunction {
|
|
20
|
+
name: string;
|
|
21
|
+
method: string;
|
|
22
|
+
paths: string[];
|
|
23
|
+
versions:
|
|
24
|
+
| Array<Exclude<VersionValue, Array<string | typeof VERSION_NEUTRAL>>>
|
|
25
|
+
| undefined;
|
|
26
|
+
encrypted: boolean;
|
|
27
|
+
parameters: IParameter[];
|
|
28
|
+
status?: number;
|
|
29
|
+
type?: string;
|
|
30
|
+
contentType: "application/json" | "text/plain";
|
|
31
|
+
security: Record<string, string[]>[];
|
|
32
|
+
exceptions: Record<
|
|
33
|
+
number | "2XX" | "3XX" | "4XX" | "5XX",
|
|
34
|
+
IController.IException
|
|
35
|
+
>;
|
|
36
|
+
swaggerTags: string[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type IParameter =
|
|
40
|
+
| ICommonParameter
|
|
41
|
+
| IQueryParameter
|
|
42
|
+
| IHeadersParameter
|
|
43
|
+
| IBodyParameter
|
|
44
|
+
| IPathParameter;
|
|
45
|
+
export interface ICommonParameter {
|
|
46
|
+
custom: false;
|
|
47
|
+
category: ParamCategory;
|
|
48
|
+
index: number;
|
|
49
|
+
name: string;
|
|
50
|
+
field: string | undefined;
|
|
51
|
+
}
|
|
52
|
+
export interface IHeadersParameter {
|
|
53
|
+
custom: true;
|
|
54
|
+
category: "headers";
|
|
55
|
+
index: number;
|
|
56
|
+
name: string;
|
|
57
|
+
field: string | undefined;
|
|
58
|
+
}
|
|
59
|
+
export interface IQueryParameter {
|
|
60
|
+
custom: true;
|
|
61
|
+
category: "query";
|
|
62
|
+
index: number;
|
|
63
|
+
name: string;
|
|
64
|
+
field: string | undefined;
|
|
65
|
+
}
|
|
66
|
+
export interface IBodyParameter {
|
|
67
|
+
custom: true;
|
|
68
|
+
category: "body";
|
|
69
|
+
index: number;
|
|
70
|
+
name: string;
|
|
71
|
+
field: string | undefined;
|
|
72
|
+
encrypted: boolean;
|
|
73
|
+
contentType:
|
|
74
|
+
| "application/json"
|
|
75
|
+
| "application/x-www-form-urlencoded"
|
|
76
|
+
| "multipart/form-data"
|
|
77
|
+
| "text/plain";
|
|
78
|
+
}
|
|
79
|
+
export interface IPathParameter {
|
|
80
|
+
custom: true;
|
|
81
|
+
category: "param";
|
|
82
|
+
index: number;
|
|
83
|
+
name: string;
|
|
84
|
+
field: string | undefined;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface IException {
|
|
88
|
+
type: string;
|
|
89
|
+
status: number | "2XX" | "3XX" | "4XX" | "5XX";
|
|
90
|
+
description: string | undefined;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { IJsonSchema } from "typia";
|
|
2
|
-
import { IJsDocTagInfo } from "typia/lib/schemas/metadata/IJsDocTagInfo";
|
|
3
|
-
|
|
4
|
-
export interface ISwaggerRoute {
|
|
5
|
-
deprecated?: boolean;
|
|
6
|
-
security?: Record<string, string[]>[];
|
|
7
|
-
operationId?: string;
|
|
8
|
-
tags: string[];
|
|
9
|
-
parameters: ISwaggerRoute.IParameter[];
|
|
10
|
-
requestBody?: ISwaggerRoute.IRequestBody;
|
|
11
|
-
responses: ISwaggerRoute.IResponseBody;
|
|
12
|
-
summary?: string;
|
|
13
|
-
description?: string;
|
|
14
|
-
"x-nestia-method"?: string;
|
|
15
|
-
"x-nestia-namespace"?: string;
|
|
16
|
-
"x-nestia-jsDocTags"?: IJsDocTagInfo[];
|
|
17
|
-
}
|
|
18
|
-
export namespace ISwaggerRoute {
|
|
19
|
-
export interface IParameter {
|
|
20
|
-
name: string;
|
|
21
|
-
in: string;
|
|
22
|
-
schema: IJsonSchema;
|
|
23
|
-
required: boolean;
|
|
24
|
-
description?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface IRequestBody {
|
|
27
|
-
description?: string;
|
|
28
|
-
content: IContent;
|
|
29
|
-
required: true;
|
|
30
|
-
"x-nestia-encrypted"?: boolean;
|
|
31
|
-
}
|
|
32
|
-
export type IResponseBody = Record<
|
|
33
|
-
string,
|
|
34
|
-
{
|
|
35
|
-
description: string;
|
|
36
|
-
content?: IContent;
|
|
37
|
-
"x-nestia-encrypted"?: boolean;
|
|
38
|
-
}
|
|
39
|
-
>;
|
|
40
|
-
export interface IContent {
|
|
41
|
-
"application/x-www-form-urlencoded"?: {
|
|
42
|
-
schema: IJsonSchema;
|
|
43
|
-
};
|
|
44
|
-
"application/json"?: {
|
|
45
|
-
schema: IJsonSchema;
|
|
46
|
-
};
|
|
47
|
-
"text/plain"?: {
|
|
48
|
-
schema: IJsonSchema;
|
|
49
|
-
};
|
|
50
|
-
"multipart/form-data"?: {
|
|
51
|
-
schema: IJsonSchema;
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
}
|
|
1
|
+
import { IJsonSchema } from "typia";
|
|
2
|
+
import { IJsDocTagInfo } from "typia/lib/schemas/metadata/IJsDocTagInfo";
|
|
3
|
+
|
|
4
|
+
export interface ISwaggerRoute {
|
|
5
|
+
deprecated?: boolean;
|
|
6
|
+
security?: Record<string, string[]>[];
|
|
7
|
+
operationId?: string;
|
|
8
|
+
tags: string[];
|
|
9
|
+
parameters: ISwaggerRoute.IParameter[];
|
|
10
|
+
requestBody?: ISwaggerRoute.IRequestBody;
|
|
11
|
+
responses: ISwaggerRoute.IResponseBody;
|
|
12
|
+
summary?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
"x-nestia-method"?: string;
|
|
15
|
+
"x-nestia-namespace"?: string;
|
|
16
|
+
"x-nestia-jsDocTags"?: IJsDocTagInfo[];
|
|
17
|
+
}
|
|
18
|
+
export namespace ISwaggerRoute {
|
|
19
|
+
export interface IParameter {
|
|
20
|
+
name: string;
|
|
21
|
+
in: string;
|
|
22
|
+
schema: IJsonSchema;
|
|
23
|
+
required: boolean;
|
|
24
|
+
description?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface IRequestBody {
|
|
27
|
+
description?: string;
|
|
28
|
+
content: IContent;
|
|
29
|
+
required: true;
|
|
30
|
+
"x-nestia-encrypted"?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export type IResponseBody = Record<
|
|
33
|
+
string,
|
|
34
|
+
{
|
|
35
|
+
description: string;
|
|
36
|
+
content?: IContent;
|
|
37
|
+
"x-nestia-encrypted"?: boolean;
|
|
38
|
+
}
|
|
39
|
+
>;
|
|
40
|
+
export interface IContent {
|
|
41
|
+
"application/x-www-form-urlencoded"?: {
|
|
42
|
+
schema: IJsonSchema;
|
|
43
|
+
};
|
|
44
|
+
"application/json"?: {
|
|
45
|
+
schema: IJsonSchema;
|
|
46
|
+
};
|
|
47
|
+
"text/plain"?: {
|
|
48
|
+
schema: IJsonSchema;
|
|
49
|
+
};
|
|
50
|
+
"multipart/form-data"?: {
|
|
51
|
+
schema: IJsonSchema;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|