@nestia/migrate 0.1.10 → 0.2.0
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/NestiaMigrateApplication.js +280 -151
- package/lib/NestiaMigrateApplication.js.map +1 -1
- package/lib/archivers/FileArchiver.js +0 -1
- package/lib/archivers/FileArchiver.js.map +1 -1
- package/lib/bundles/TEMPLATE.js +15 -5
- package/lib/bundles/TEMPLATE.js.map +1 -1
- package/lib/executable/bundle.js +0 -1
- package/lib/executable/bundle.js.map +1 -1
- package/lib/programmers/ControllerProgrammer.js +1 -1
- package/lib/programmers/ControllerProgrammer.js.map +1 -1
- package/lib/programmers/RouteProgrammer.js +70 -35
- package/lib/programmers/RouteProgrammer.js.map +1 -1
- package/lib/structures/IMigrateRoute.d.ts +3 -0
- package/lib/structures/ISwagger.d.ts +2 -6
- package/lib/structures/ISwaggerInfo.d.ts +71 -0
- package/lib/structures/ISwaggerInfo.js +3 -0
- package/lib/structures/ISwaggerInfo.js.map +1 -0
- package/lib/structures/ISwaggerRoute.d.ts +5 -3
- package/package.json +4 -4
- package/src/NestiaMigrateApplication.ts +22 -1
- package/src/archivers/FileArchiver.ts +0 -1
- package/src/bundles/TEMPLATE.ts +15 -5
- package/src/executable/bundle.ts +0 -1
- package/src/programmers/ControllerProgrammer.ts +1 -1
- package/src/programmers/RouteProgrammer.ts +88 -35
- package/src/structures/IMigrateRoute.ts +4 -0
- package/src/structures/ISwagger.ts +3 -7
- package/src/structures/ISwaggerInfo.ts +80 -0
- package/src/structures/ISwaggerRoute.ts +6 -3
@@ -1,9 +1,10 @@
|
|
1
1
|
import { ISwaggerComponents } from "./ISwaggerComponents";
|
2
|
+
import { ISwaggerInfo } from "./ISwaggerInfo";
|
2
3
|
import { ISwaggerRoute } from "./ISwaggerRoute";
|
3
4
|
|
4
5
|
export interface ISwagger {
|
5
6
|
openapi: `3.0.${number}`;
|
6
|
-
info:
|
7
|
+
info: ISwaggerInfo;
|
7
8
|
servers: ISwagger.IServer[];
|
8
9
|
|
9
10
|
components: ISwaggerComponents;
|
@@ -15,10 +16,5 @@ export namespace ISwagger {
|
|
15
16
|
url: string;
|
16
17
|
description?: string;
|
17
18
|
}
|
18
|
-
export interface IInfo {
|
19
|
-
version: string;
|
20
|
-
title: string;
|
21
|
-
description?: string;
|
22
|
-
}
|
23
19
|
export type IPath = Record<string, ISwaggerRoute>;
|
24
|
-
}
|
20
|
+
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
/**
|
2
|
+
* Information about the API.
|
3
|
+
*
|
4
|
+
* @author Samchon
|
5
|
+
*/
|
6
|
+
export interface ISwaggerInfo {
|
7
|
+
/**
|
8
|
+
* The title of the API.
|
9
|
+
*/
|
10
|
+
title: string;
|
11
|
+
|
12
|
+
/**
|
13
|
+
* A short description of the API.
|
14
|
+
*/
|
15
|
+
description?: string;
|
16
|
+
|
17
|
+
/**
|
18
|
+
* A URL to the Terms of Service for the API.
|
19
|
+
*
|
20
|
+
* @format url
|
21
|
+
*/
|
22
|
+
termsOfService?: string;
|
23
|
+
|
24
|
+
/**
|
25
|
+
* The contact information for the exposed API.
|
26
|
+
*/
|
27
|
+
contact?: ISwaggerInfo.IContact;
|
28
|
+
|
29
|
+
/**
|
30
|
+
* The license information for the exposed API.
|
31
|
+
*/
|
32
|
+
license?: ISwaggerInfo.ILicense;
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Version of the API.
|
36
|
+
*/
|
37
|
+
version: string;
|
38
|
+
}
|
39
|
+
export namespace ISwaggerInfo {
|
40
|
+
/**
|
41
|
+
* Contact information for the exposed API.
|
42
|
+
*/
|
43
|
+
export interface IContact {
|
44
|
+
/**
|
45
|
+
* The identifying name of the contact person/organization.
|
46
|
+
*/
|
47
|
+
name?: string;
|
48
|
+
|
49
|
+
/**
|
50
|
+
* The URL pointing to the contact information.
|
51
|
+
*
|
52
|
+
* @format url
|
53
|
+
*/
|
54
|
+
url?: string;
|
55
|
+
|
56
|
+
/**
|
57
|
+
* The email address of the contact person/organization.
|
58
|
+
*
|
59
|
+
* @format email
|
60
|
+
*/
|
61
|
+
email?: string;
|
62
|
+
}
|
63
|
+
|
64
|
+
/**
|
65
|
+
* License information for the exposed API.
|
66
|
+
*/
|
67
|
+
export interface ILicense {
|
68
|
+
/**
|
69
|
+
* The license name used for the API.
|
70
|
+
*/
|
71
|
+
name: string;
|
72
|
+
|
73
|
+
/**
|
74
|
+
* A URL to the license used for the API.
|
75
|
+
*
|
76
|
+
* @format url
|
77
|
+
*/
|
78
|
+
url?: string;
|
79
|
+
}
|
80
|
+
}
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import { IJsDocTagInfo } from "typia/lib/metadata/IJsDocTagInfo";
|
2
|
+
|
1
3
|
import { ISwaggerSchema } from "./ISwaggeSchema";
|
2
4
|
|
3
5
|
export interface ISwaggerRoute {
|
@@ -9,10 +11,11 @@ export interface ISwaggerRoute {
|
|
9
11
|
deprecated?: boolean;
|
10
12
|
security?: Record<string, string[]>[];
|
11
13
|
tags?: string[];
|
14
|
+
"x-nestia-jsDocTags"?: IJsDocTagInfo[];
|
12
15
|
}
|
13
16
|
export namespace ISwaggerRoute {
|
14
17
|
export interface IParameter {
|
15
|
-
name
|
18
|
+
name?: string;
|
16
19
|
in: "path" | "query" | "header" | "cookie";
|
17
20
|
schema: ISwaggerSchema;
|
18
21
|
required?: boolean;
|
@@ -21,7 +24,7 @@ export namespace ISwaggerRoute {
|
|
21
24
|
export interface IRequestBody {
|
22
25
|
description?: string;
|
23
26
|
content: IContent;
|
24
|
-
required?:
|
27
|
+
required?: boolean;
|
25
28
|
"x-nestia-encrypted"?: boolean;
|
26
29
|
}
|
27
30
|
export type IResponseBody = Record<
|
@@ -34,7 +37,7 @@ export namespace ISwaggerRoute {
|
|
34
37
|
>;
|
35
38
|
export interface IContent {
|
36
39
|
"text/plain"?: {
|
37
|
-
schema: ISwaggerSchema
|
40
|
+
schema: ISwaggerSchema;
|
38
41
|
};
|
39
42
|
"application/json"?: {
|
40
43
|
schema: ISwaggerSchema;
|