echoapi-converter 0.0.89 → 1.0.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/dist/index.d.ts +31 -4
- package/dist/index.js +835 -208
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ApipostObj } from '@/types/index';
|
|
|
3
3
|
declare class ApipostToSwagger {
|
|
4
4
|
apiToSwaggerOrigin: Partial<ApipostObj>;
|
|
5
5
|
apiToSwaggerResult: any;
|
|
6
|
-
apiToSwaggerVersion: "2.0" | "3.0";
|
|
6
|
+
apiToSwaggerVersion: "2.0" | "3.0" | "3.1";
|
|
7
7
|
constructor();
|
|
8
8
|
private handleProject;
|
|
9
9
|
private handleModels;
|
|
@@ -13,7 +13,12 @@ declare class ApipostToSwagger {
|
|
|
13
13
|
private array2NamePathObj;
|
|
14
14
|
private array2TreeExport;
|
|
15
15
|
private handleApis;
|
|
16
|
-
|
|
16
|
+
private sortApiNodes;
|
|
17
|
+
private sortByXSortPreserveStructure;
|
|
18
|
+
apiToswagger(apipostObj: ApipostObj, version: "2.0" | "3.0" | "3.1", language?: "en" | "zh-cn" | "ja" | "zh-hant" | "id", options?: {
|
|
19
|
+
includeExt?: boolean;
|
|
20
|
+
dirAsTags?: boolean;
|
|
21
|
+
}): Promise<{
|
|
17
22
|
status: "error" | "success";
|
|
18
23
|
message: string;
|
|
19
24
|
data: any;
|
|
@@ -96,11 +101,17 @@ declare class ApifoxToApipost {
|
|
|
96
101
|
serversMap: any;
|
|
97
102
|
modelMap: any;
|
|
98
103
|
foldersMap: any;
|
|
104
|
+
folderNameMap: any;
|
|
99
105
|
apisMap: any;
|
|
100
106
|
dbLinkmap: any;
|
|
101
107
|
commonScripts: any;
|
|
102
108
|
modelIdMap: any;
|
|
103
109
|
envsMap: any;
|
|
110
|
+
apifoxApiIdMap: any;
|
|
111
|
+
config: {
|
|
112
|
+
project_id: string;
|
|
113
|
+
unrelated_id: boolean;
|
|
114
|
+
};
|
|
104
115
|
constructor();
|
|
105
116
|
private validate;
|
|
106
117
|
private clear;
|
|
@@ -120,6 +131,7 @@ declare class ApifoxToApipost {
|
|
|
120
131
|
private completionApiRequestAuth;
|
|
121
132
|
private completionApiRequestParameter;
|
|
122
133
|
private completionApiRequestBody;
|
|
134
|
+
private completionTcpRequestBody;
|
|
123
135
|
private completionApiRequest;
|
|
124
136
|
private completionApiFolder;
|
|
125
137
|
private completionApiTargetMark;
|
|
@@ -131,6 +143,10 @@ declare class ApifoxToApipost {
|
|
|
131
143
|
private completionEventList;
|
|
132
144
|
private completionTestCases;
|
|
133
145
|
private initApis;
|
|
146
|
+
private initWebSocket;
|
|
147
|
+
private completionWebsockets;
|
|
148
|
+
private initSocketIo;
|
|
149
|
+
private completionSocketIo;
|
|
134
150
|
private completionDocs;
|
|
135
151
|
private initDoc;
|
|
136
152
|
private completionTcpClient;
|
|
@@ -139,7 +155,10 @@ declare class ApifoxToApipost {
|
|
|
139
155
|
private completionTcp;
|
|
140
156
|
private initTcp;
|
|
141
157
|
private initTestCase;
|
|
142
|
-
convert(json: any,
|
|
158
|
+
convert(json: any, config?: {
|
|
159
|
+
project_id: string;
|
|
160
|
+
unrelated_id: boolean;
|
|
161
|
+
}): {
|
|
143
162
|
status: "error" | "success";
|
|
144
163
|
message: string;
|
|
145
164
|
data: any;
|
|
@@ -160,6 +179,11 @@ declare class ApifoxcliToApipost {
|
|
|
160
179
|
foldersMap: any;
|
|
161
180
|
commonScripts: any;
|
|
162
181
|
modelIdMap: any;
|
|
182
|
+
config: {
|
|
183
|
+
project_id: string;
|
|
184
|
+
unrelated_id: boolean;
|
|
185
|
+
};
|
|
186
|
+
apifoxApiIdMap: any;
|
|
163
187
|
constructor();
|
|
164
188
|
private validate;
|
|
165
189
|
private clear;
|
|
@@ -191,7 +215,10 @@ declare class ApifoxcliToApipost {
|
|
|
191
215
|
private completionTcpMethodRequest;
|
|
192
216
|
private completionTcpMethod;
|
|
193
217
|
private completionTcp;
|
|
194
|
-
convert(json: any,
|
|
218
|
+
convert(json: any, config?: {
|
|
219
|
+
project_id: string;
|
|
220
|
+
unrelated_id: boolean;
|
|
221
|
+
}): {
|
|
195
222
|
status: "error" | "success";
|
|
196
223
|
message: string;
|
|
197
224
|
data: any;
|