@nestia/sdk 2.6.2 → 2.6.3
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/analyses/ControllerAnalyzer.js +3 -3
- package/lib/analyses/ControllerAnalyzer.js.map +1 -1
- package/lib/analyses/ImportAnalyzer.d.ts +1 -2
- package/lib/analyses/ImportAnalyzer.js +2 -2
- package/lib/analyses/ImportAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectAnalyzer.js +2 -2
- package/lib/analyses/ReflectAnalyzer.js.map +1 -1
- package/lib/generates/SwaggerGenerator.js +4 -4
- package/lib/generates/SwaggerGenerator.js.map +1 -1
- package/lib/generates/internal/ImportDictionary.js +6 -8
- package/lib/generates/internal/ImportDictionary.js.map +1 -1
- package/lib/structures/TypeEntry.js +2 -2
- package/lib/structures/TypeEntry.js.map +1 -1
- package/package.json +4 -4
- package/src/INestiaConfig.ts +248 -248
- package/src/NestiaSdkApplication.ts +255 -255
- package/src/analyses/ControllerAnalyzer.ts +402 -402
- package/src/analyses/ExceptionAnalyzer.ts +148 -148
- package/src/analyses/ImportAnalyzer.ts +1 -2
- package/src/analyses/ReflectAnalyzer.ts +463 -463
- package/src/analyses/SecurityAnalyzer.ts +24 -24
- package/src/generates/CloneGenerator.ts +62 -62
- package/src/generates/E2eGenerator.ts +66 -66
- package/src/generates/SdkGenerator.ts +84 -84
- package/src/generates/SwaggerGenerator.ts +446 -446
- package/src/generates/internal/E2eFileProgrammer.ts +182 -182
- package/src/generates/internal/FilePrinter.ts +53 -53
- package/src/generates/internal/ImportDictionary.ts +147 -149
- package/src/generates/internal/SdkAliasCollection.ts +152 -152
- package/src/generates/internal/SdkCloneProgrammer.ts +155 -155
- package/src/generates/internal/SdkFileProgrammer.ts +115 -115
- package/src/generates/internal/SdkFunctionProgrammer.ts +298 -298
- package/src/generates/internal/SdkImportWizard.ts +55 -55
- package/src/generates/internal/SdkNamespaceProgrammer.ts +510 -510
- package/src/generates/internal/SdkRouteProgrammer.ts +83 -83
- package/src/generates/internal/SdkSimulationProgrammer.ts +365 -365
- package/src/generates/internal/SdkTypeProgrammer.ts +385 -385
- package/src/generates/internal/SwaggerSchemaGenerator.ts +438 -438
- package/src/structures/IController.ts +94 -94
- package/src/structures/IRoute.ts +53 -53
- package/src/structures/ISwagger.ts +91 -91
- package/src/structures/ISwaggerRoute.ts +54 -54
- package/src/structures/ISwaggerSecurityScheme.ts +65 -65
- package/src/structures/ParamCategory.ts +1 -1
- package/src/structures/TypeEntry.ts +1 -1
- package/src/utils/StringUtil.ts +6 -6
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
import type { VERSION_NEUTRAL, VersionValue } from "@nestjs/common/interfaces";
|
|
2
|
-
|
|
3
|
-
import type { ParamCategory } from "./ParamCategory";
|
|
4
|
-
|
|
5
|
-
export interface IController {
|
|
6
|
-
target: Function;
|
|
7
|
-
file: string;
|
|
8
|
-
name: string;
|
|
9
|
-
prefixes: string[];
|
|
10
|
-
paths: string[];
|
|
11
|
-
versions:
|
|
12
|
-
| Array<Exclude<VersionValue, Array<string | typeof VERSION_NEUTRAL>>>
|
|
13
|
-
| undefined;
|
|
14
|
-
functions: IController.IFunction[];
|
|
15
|
-
security: Record<string, string[]>[];
|
|
16
|
-
swaggerTgas: string[];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export namespace IController {
|
|
20
|
-
export interface IFunction {
|
|
21
|
-
target: Function;
|
|
22
|
-
name: string;
|
|
23
|
-
method: string;
|
|
24
|
-
paths: string[];
|
|
25
|
-
versions:
|
|
26
|
-
| Array<Exclude<VersionValue, Array<string | typeof VERSION_NEUTRAL>>>
|
|
27
|
-
| undefined;
|
|
28
|
-
encrypted: boolean;
|
|
29
|
-
parameters: IParameter[];
|
|
30
|
-
status?: number;
|
|
31
|
-
type?: string;
|
|
32
|
-
contentType: "application/json" | "text/plain";
|
|
33
|
-
security: Record<string, string[]>[];
|
|
34
|
-
exceptions: Record<
|
|
35
|
-
number | "2XX" | "3XX" | "4XX" | "5XX",
|
|
36
|
-
IController.IException
|
|
37
|
-
>;
|
|
38
|
-
swaggerTags: string[];
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export type IParameter =
|
|
42
|
-
| ICommonParameter
|
|
43
|
-
| IQueryParameter
|
|
44
|
-
| IHeadersParameter
|
|
45
|
-
| IBodyParameter
|
|
46
|
-
| IPathParameter;
|
|
47
|
-
export interface ICommonParameter {
|
|
48
|
-
custom: false;
|
|
49
|
-
category: ParamCategory;
|
|
50
|
-
index: number;
|
|
51
|
-
name: string;
|
|
52
|
-
field: string | undefined;
|
|
53
|
-
}
|
|
54
|
-
export interface IHeadersParameter {
|
|
55
|
-
custom: true;
|
|
56
|
-
category: "headers";
|
|
57
|
-
index: number;
|
|
58
|
-
name: string;
|
|
59
|
-
field: string | undefined;
|
|
60
|
-
}
|
|
61
|
-
export interface IQueryParameter {
|
|
62
|
-
custom: true;
|
|
63
|
-
category: "query";
|
|
64
|
-
index: number;
|
|
65
|
-
name: string;
|
|
66
|
-
field: string | undefined;
|
|
67
|
-
}
|
|
68
|
-
export interface IBodyParameter {
|
|
69
|
-
custom: true;
|
|
70
|
-
category: "body";
|
|
71
|
-
index: number;
|
|
72
|
-
name: string;
|
|
73
|
-
field: string | undefined;
|
|
74
|
-
encrypted: boolean;
|
|
75
|
-
contentType:
|
|
76
|
-
| "application/json"
|
|
77
|
-
| "application/x-www-form-urlencoded"
|
|
78
|
-
| "multipart/form-data"
|
|
79
|
-
| "text/plain";
|
|
80
|
-
}
|
|
81
|
-
export interface IPathParameter {
|
|
82
|
-
custom: true;
|
|
83
|
-
category: "param";
|
|
84
|
-
index: number;
|
|
85
|
-
name: string;
|
|
86
|
-
field: string | undefined;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface IException {
|
|
90
|
-
type: string;
|
|
91
|
-
status: number | "2XX" | "3XX" | "4XX" | "5XX";
|
|
92
|
-
description: string | undefined;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
1
|
+
import type { VERSION_NEUTRAL, VersionValue } from "@nestjs/common/interfaces";
|
|
2
|
+
|
|
3
|
+
import type { ParamCategory } from "./ParamCategory";
|
|
4
|
+
|
|
5
|
+
export interface IController {
|
|
6
|
+
target: Function;
|
|
7
|
+
file: string;
|
|
8
|
+
name: string;
|
|
9
|
+
prefixes: string[];
|
|
10
|
+
paths: string[];
|
|
11
|
+
versions:
|
|
12
|
+
| Array<Exclude<VersionValue, Array<string | typeof VERSION_NEUTRAL>>>
|
|
13
|
+
| undefined;
|
|
14
|
+
functions: IController.IFunction[];
|
|
15
|
+
security: Record<string, string[]>[];
|
|
16
|
+
swaggerTgas: string[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export namespace IController {
|
|
20
|
+
export interface IFunction {
|
|
21
|
+
target: Function;
|
|
22
|
+
name: string;
|
|
23
|
+
method: string;
|
|
24
|
+
paths: string[];
|
|
25
|
+
versions:
|
|
26
|
+
| Array<Exclude<VersionValue, Array<string | typeof VERSION_NEUTRAL>>>
|
|
27
|
+
| undefined;
|
|
28
|
+
encrypted: boolean;
|
|
29
|
+
parameters: IParameter[];
|
|
30
|
+
status?: number;
|
|
31
|
+
type?: string;
|
|
32
|
+
contentType: "application/json" | "text/plain";
|
|
33
|
+
security: Record<string, string[]>[];
|
|
34
|
+
exceptions: Record<
|
|
35
|
+
number | "2XX" | "3XX" | "4XX" | "5XX",
|
|
36
|
+
IController.IException
|
|
37
|
+
>;
|
|
38
|
+
swaggerTags: string[];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type IParameter =
|
|
42
|
+
| ICommonParameter
|
|
43
|
+
| IQueryParameter
|
|
44
|
+
| IHeadersParameter
|
|
45
|
+
| IBodyParameter
|
|
46
|
+
| IPathParameter;
|
|
47
|
+
export interface ICommonParameter {
|
|
48
|
+
custom: false;
|
|
49
|
+
category: ParamCategory;
|
|
50
|
+
index: number;
|
|
51
|
+
name: string;
|
|
52
|
+
field: string | undefined;
|
|
53
|
+
}
|
|
54
|
+
export interface IHeadersParameter {
|
|
55
|
+
custom: true;
|
|
56
|
+
category: "headers";
|
|
57
|
+
index: number;
|
|
58
|
+
name: string;
|
|
59
|
+
field: string | undefined;
|
|
60
|
+
}
|
|
61
|
+
export interface IQueryParameter {
|
|
62
|
+
custom: true;
|
|
63
|
+
category: "query";
|
|
64
|
+
index: number;
|
|
65
|
+
name: string;
|
|
66
|
+
field: string | undefined;
|
|
67
|
+
}
|
|
68
|
+
export interface IBodyParameter {
|
|
69
|
+
custom: true;
|
|
70
|
+
category: "body";
|
|
71
|
+
index: number;
|
|
72
|
+
name: string;
|
|
73
|
+
field: string | undefined;
|
|
74
|
+
encrypted: boolean;
|
|
75
|
+
contentType:
|
|
76
|
+
| "application/json"
|
|
77
|
+
| "application/x-www-form-urlencoded"
|
|
78
|
+
| "multipart/form-data"
|
|
79
|
+
| "text/plain";
|
|
80
|
+
}
|
|
81
|
+
export interface IPathParameter {
|
|
82
|
+
custom: true;
|
|
83
|
+
category: "param";
|
|
84
|
+
index: number;
|
|
85
|
+
name: string;
|
|
86
|
+
field: string | undefined;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface IException {
|
|
90
|
+
type: string;
|
|
91
|
+
status: number | "2XX" | "3XX" | "4XX" | "5XX";
|
|
92
|
+
description: string | undefined;
|
|
93
|
+
}
|
|
94
|
+
}
|
package/src/structures/IRoute.ts
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
import { Metadata } from "typia/lib/schemas/metadata/Metadata";
|
|
3
|
-
|
|
4
|
-
import { IController } from "./IController";
|
|
5
|
-
|
|
6
|
-
export interface IRoute {
|
|
7
|
-
controller: Function;
|
|
8
|
-
name: string;
|
|
9
|
-
method: string;
|
|
10
|
-
path: string;
|
|
11
|
-
encrypted: boolean;
|
|
12
|
-
status?: number;
|
|
13
|
-
|
|
14
|
-
accessors: string[];
|
|
15
|
-
parameters: IRoute.IParameter[];
|
|
16
|
-
imports: [string, string[]][];
|
|
17
|
-
output: IRoute.IOutput;
|
|
18
|
-
|
|
19
|
-
location: string;
|
|
20
|
-
target: {
|
|
21
|
-
class: Function;
|
|
22
|
-
function: Function;
|
|
23
|
-
};
|
|
24
|
-
description?: string;
|
|
25
|
-
operationId?: string;
|
|
26
|
-
jsDocTags: ts.JSDocTagInfo[];
|
|
27
|
-
setHeaders: Array<
|
|
28
|
-
| { type: "setter"; source: string; target?: string }
|
|
29
|
-
| { type: "assigner"; source: string }
|
|
30
|
-
>;
|
|
31
|
-
security: Record<string, string[]>[];
|
|
32
|
-
exceptions: Record<number | "2XX" | "3XX" | "4XX" | "5XX", IRoute.IOutput>;
|
|
33
|
-
swaggerTags: string[];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export namespace IRoute {
|
|
37
|
-
export type IParameter = IController.IParameter & {
|
|
38
|
-
optional: boolean;
|
|
39
|
-
type: ts.Type;
|
|
40
|
-
typeName: string;
|
|
41
|
-
metadata?: Metadata;
|
|
42
|
-
};
|
|
43
|
-
export interface IOutput {
|
|
44
|
-
type: ts.Type;
|
|
45
|
-
typeName: string;
|
|
46
|
-
metadata?: Metadata;
|
|
47
|
-
description?: string;
|
|
48
|
-
contentType:
|
|
49
|
-
| "application/x-www-form-urlencoded"
|
|
50
|
-
| "application/json"
|
|
51
|
-
| "text/plain";
|
|
52
|
-
}
|
|
53
|
-
}
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
import { Metadata } from "typia/lib/schemas/metadata/Metadata";
|
|
3
|
+
|
|
4
|
+
import { IController } from "./IController";
|
|
5
|
+
|
|
6
|
+
export interface IRoute {
|
|
7
|
+
controller: Function;
|
|
8
|
+
name: string;
|
|
9
|
+
method: string;
|
|
10
|
+
path: string;
|
|
11
|
+
encrypted: boolean;
|
|
12
|
+
status?: number;
|
|
13
|
+
|
|
14
|
+
accessors: string[];
|
|
15
|
+
parameters: IRoute.IParameter[];
|
|
16
|
+
imports: [string, string[]][];
|
|
17
|
+
output: IRoute.IOutput;
|
|
18
|
+
|
|
19
|
+
location: string;
|
|
20
|
+
target: {
|
|
21
|
+
class: Function;
|
|
22
|
+
function: Function;
|
|
23
|
+
};
|
|
24
|
+
description?: string;
|
|
25
|
+
operationId?: string;
|
|
26
|
+
jsDocTags: ts.JSDocTagInfo[];
|
|
27
|
+
setHeaders: Array<
|
|
28
|
+
| { type: "setter"; source: string; target?: string }
|
|
29
|
+
| { type: "assigner"; source: string }
|
|
30
|
+
>;
|
|
31
|
+
security: Record<string, string[]>[];
|
|
32
|
+
exceptions: Record<number | "2XX" | "3XX" | "4XX" | "5XX", IRoute.IOutput>;
|
|
33
|
+
swaggerTags: string[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export namespace IRoute {
|
|
37
|
+
export type IParameter = IController.IParameter & {
|
|
38
|
+
optional: boolean;
|
|
39
|
+
type: ts.Type;
|
|
40
|
+
typeName: string;
|
|
41
|
+
metadata?: Metadata;
|
|
42
|
+
};
|
|
43
|
+
export interface IOutput {
|
|
44
|
+
type: ts.Type;
|
|
45
|
+
typeName: string;
|
|
46
|
+
metadata?: Metadata;
|
|
47
|
+
description?: string;
|
|
48
|
+
contentType:
|
|
49
|
+
| "application/x-www-form-urlencoded"
|
|
50
|
+
| "application/json"
|
|
51
|
+
| "text/plain";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
import { ISwaggerComponents } from "./ISwaggerComponents";
|
|
2
|
-
import { ISwaggerInfo } from "./ISwaggerInfo";
|
|
3
|
-
import { ISwaggerRoute } from "./ISwaggerRoute";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Swagger Document.
|
|
7
|
-
*
|
|
8
|
-
* `ISwagger` is a data structure representing content of `swagger.json` file
|
|
9
|
-
* generated by Nestia. Note that, this is not an universal structure, but a dedicated
|
|
10
|
-
* structure only for Nestia.
|
|
11
|
-
*
|
|
12
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
13
|
-
*/
|
|
14
|
-
export interface ISwagger {
|
|
15
|
-
/**
|
|
16
|
-
* The version of the OpenAPI document.
|
|
17
|
-
*
|
|
18
|
-
* Nestia always generate OpenAPI 3.0.x document.
|
|
19
|
-
*/
|
|
20
|
-
openapi: `3.0.${number}`;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* List of servers that provide the API.
|
|
24
|
-
*/
|
|
25
|
-
servers: ISwagger.IServer[];
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Information about the API.
|
|
29
|
-
*/
|
|
30
|
-
info: ISwaggerInfo;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* The available paths and operations for the API.
|
|
34
|
-
*
|
|
35
|
-
* The 1st key is the path, and the 2nd key is the HTTP method.
|
|
36
|
-
*/
|
|
37
|
-
paths: Record<string, Record<string, ISwaggerRoute>>;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* An object to hold reusable data structures.
|
|
41
|
-
*
|
|
42
|
-
* It stores both DTO schemas and security schemes.
|
|
43
|
-
*
|
|
44
|
-
* For reference, `nestia` defines every object and alias types as reusable DTO
|
|
45
|
-
* schemas. The alias type means that defined by `type` keyword in TypeScript.
|
|
46
|
-
*/
|
|
47
|
-
components: ISwaggerComponents;
|
|
48
|
-
|
|
49
|
-
// /**
|
|
50
|
-
// * A declaration of which security mechanisms can be used across the API.
|
|
51
|
-
// *
|
|
52
|
-
// * When this property be configured, it would be overwritten in every API routes.
|
|
53
|
-
// *
|
|
54
|
-
// * For reference, key means the name of security scheme and value means the `scopes`.
|
|
55
|
-
// * The `scopes` can be used only when target security scheme is `oauth2` type,
|
|
56
|
-
// * especially for {@link ISwaggerSecurityScheme.IOAuth2.IFlow.scopes} property.
|
|
57
|
-
// */
|
|
58
|
-
// security?: Record<string, string[]>[];
|
|
59
|
-
}
|
|
60
|
-
export namespace ISwagger {
|
|
61
|
-
/**
|
|
62
|
-
* Remote server definition.
|
|
63
|
-
*/
|
|
64
|
-
export interface IServer {
|
|
65
|
-
/**
|
|
66
|
-
* A URL to the target host.
|
|
67
|
-
*
|
|
68
|
-
* @format uri
|
|
69
|
-
*/
|
|
70
|
-
url: string;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* An optional string describing the target server.
|
|
74
|
-
*/
|
|
75
|
-
description?: string;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export interface IExternalDocs {
|
|
79
|
-
/**
|
|
80
|
-
* The URL for target documentation.
|
|
81
|
-
*
|
|
82
|
-
* @format uri
|
|
83
|
-
*/
|
|
84
|
-
url: string;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* A short description of the target documentation.
|
|
88
|
-
*/
|
|
89
|
-
description?: string;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
1
|
+
import { ISwaggerComponents } from "./ISwaggerComponents";
|
|
2
|
+
import { ISwaggerInfo } from "./ISwaggerInfo";
|
|
3
|
+
import { ISwaggerRoute } from "./ISwaggerRoute";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Swagger Document.
|
|
7
|
+
*
|
|
8
|
+
* `ISwagger` is a data structure representing content of `swagger.json` file
|
|
9
|
+
* generated by Nestia. Note that, this is not an universal structure, but a dedicated
|
|
10
|
+
* structure only for Nestia.
|
|
11
|
+
*
|
|
12
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
13
|
+
*/
|
|
14
|
+
export interface ISwagger {
|
|
15
|
+
/**
|
|
16
|
+
* The version of the OpenAPI document.
|
|
17
|
+
*
|
|
18
|
+
* Nestia always generate OpenAPI 3.0.x document.
|
|
19
|
+
*/
|
|
20
|
+
openapi: `3.0.${number}`;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* List of servers that provide the API.
|
|
24
|
+
*/
|
|
25
|
+
servers: ISwagger.IServer[];
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Information about the API.
|
|
29
|
+
*/
|
|
30
|
+
info: ISwaggerInfo;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The available paths and operations for the API.
|
|
34
|
+
*
|
|
35
|
+
* The 1st key is the path, and the 2nd key is the HTTP method.
|
|
36
|
+
*/
|
|
37
|
+
paths: Record<string, Record<string, ISwaggerRoute>>;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* An object to hold reusable data structures.
|
|
41
|
+
*
|
|
42
|
+
* It stores both DTO schemas and security schemes.
|
|
43
|
+
*
|
|
44
|
+
* For reference, `nestia` defines every object and alias types as reusable DTO
|
|
45
|
+
* schemas. The alias type means that defined by `type` keyword in TypeScript.
|
|
46
|
+
*/
|
|
47
|
+
components: ISwaggerComponents;
|
|
48
|
+
|
|
49
|
+
// /**
|
|
50
|
+
// * A declaration of which security mechanisms can be used across the API.
|
|
51
|
+
// *
|
|
52
|
+
// * When this property be configured, it would be overwritten in every API routes.
|
|
53
|
+
// *
|
|
54
|
+
// * For reference, key means the name of security scheme and value means the `scopes`.
|
|
55
|
+
// * The `scopes` can be used only when target security scheme is `oauth2` type,
|
|
56
|
+
// * especially for {@link ISwaggerSecurityScheme.IOAuth2.IFlow.scopes} property.
|
|
57
|
+
// */
|
|
58
|
+
// security?: Record<string, string[]>[];
|
|
59
|
+
}
|
|
60
|
+
export namespace ISwagger {
|
|
61
|
+
/**
|
|
62
|
+
* Remote server definition.
|
|
63
|
+
*/
|
|
64
|
+
export interface IServer {
|
|
65
|
+
/**
|
|
66
|
+
* A URL to the target host.
|
|
67
|
+
*
|
|
68
|
+
* @format uri
|
|
69
|
+
*/
|
|
70
|
+
url: string;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* An optional string describing the target server.
|
|
74
|
+
*/
|
|
75
|
+
description?: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface IExternalDocs {
|
|
79
|
+
/**
|
|
80
|
+
* The URL for target documentation.
|
|
81
|
+
*
|
|
82
|
+
* @format uri
|
|
83
|
+
*/
|
|
84
|
+
url: string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* A short description of the target documentation.
|
|
88
|
+
*/
|
|
89
|
+
description?: string;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -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
|
+
}
|