Skip to content

Commit 8ba4971

Browse files
committed
test: 更新单测
1 parent 7406abd commit 8ba4971

File tree

12 files changed

+232
-232
lines changed

12 files changed

+232
-232
lines changed

test/example-dest/2.0/pet-store.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export type ApiResponse = {
122122
*/
123123
export async function addPet(data:Pet,config?:AxiosRequestConfig): AxiosPromise<unknown> {
124124
return axios({
125-
method: "post",
125+
method: "POST",
126126
url: `/pet`,
127127
data: data,
128128
...config
@@ -138,7 +138,7 @@ data: data,
138138
*/
139139
export async function updatePet(data:Pet,config?:AxiosRequestConfig): AxiosPromise<unknown> {
140140
return axios({
141-
method: "put",
141+
method: "PUT",
142142
url: `/pet`,
143143
data: data,
144144
...config
@@ -160,7 +160,7 @@ export async function findPetsByStatus(status:Array<
160160
("available"|"pending"|"sold")
161161
>,config?:AxiosRequestConfig): AxiosPromise<Array<Pet>> {
162162
return axios({
163-
method: "get",
163+
method: "GET",
164164
url: `/pet/findByStatus`,
165165
params: {"status": status},
166166
...config
@@ -178,7 +178,7 @@ params: {"status": status},
178178
*/
179179
export async function findPetsByTags(tags:Array<string>,config?:AxiosRequestConfig): AxiosPromise<Array<Pet>> {
180180
return axios({
181-
method: "get",
181+
method: "GET",
182182
url: `/pet/findByTags`,
183183
params: {"tags": tags},
184184
...config
@@ -200,7 +200,7 @@ export async function getPetById(petId:
200200
number
201201
,config?:AxiosRequestConfig): AxiosPromise<Pet> {
202202
return axios({
203-
method: "get",
203+
method: "GET",
204204
url: `/pet/${petId}`,
205205
...config
206206
});
@@ -230,7 +230,7 @@ number
230230
"status"?:string;
231231
},config?:AxiosRequestConfig): AxiosPromise<unknown> {
232232
return axios({
233-
method: "post",
233+
method: "POST",
234234
url: `/pet/${petId}`,
235235
data: data,
236236
...config
@@ -252,7 +252,7 @@ export async function deletePet(petId:
252252
number
253253
,apiKey?:string,config?:AxiosRequestConfig): AxiosPromise<unknown> {
254254
return axios({
255-
method: "delete",
255+
method: "DELETE",
256256
url: `/pet/${petId}`,
257257
headers: {"api_key": apiKey},
258258
...config
@@ -285,7 +285,7 @@ number
285285
"file"?:Blob;
286286
},config?:AxiosRequestConfig): AxiosPromise<ApiResponse> {
287287
return axios({
288-
method: "post",
288+
method: "POST",
289289
url: `/pet/${petId}/uploadImage`,
290290
data: data,
291291
...config
@@ -306,7 +306,7 @@ export async function getInventory(config?:AxiosRequestConfig): AxiosPromise<{
306306
[key: string]:number;
307307
}> {
308308
return axios({
309-
method: "get",
309+
method: "GET",
310310
url: `/store/inventory`,
311311
...config
312312
});
@@ -322,7 +322,7 @@ export async function getInventory(config?:AxiosRequestConfig): AxiosPromise<{
322322
*/
323323
export async function placeOrder(data:Order,config?:AxiosRequestConfig): AxiosPromise<Order> {
324324
return axios({
325-
method: "post",
325+
method: "POST",
326326
url: `/store/order`,
327327
data: data,
328328
...config
@@ -346,7 +346,7 @@ export async function getOrderById(orderId:
346346
number
347347
,config?:AxiosRequestConfig): AxiosPromise<Order> {
348348
return axios({
349-
method: "get",
349+
method: "GET",
350350
url: `/store/order/${orderId}`,
351351
...config
352352
});
@@ -367,7 +367,7 @@ export async function deleteOrder(orderId:
367367
number
368368
,config?:AxiosRequestConfig): AxiosPromise<unknown> {
369369
return axios({
370-
method: "delete",
370+
method: "DELETE",
371371
url: `/store/order/${orderId}`,
372372
...config
373373
});
@@ -382,7 +382,7 @@ number
382382
*/
383383
export async function createUser(data:User,config?:AxiosRequestConfig): AxiosPromise<unknown> {
384384
return axios({
385-
method: "post",
385+
method: "POST",
386386
url: `/user`,
387387
data: data,
388388
...config
@@ -398,7 +398,7 @@ data: data,
398398
*/
399399
export async function createUsersWithArrayInput(data:Array<User>,config?:AxiosRequestConfig): AxiosPromise<unknown> {
400400
return axios({
401-
method: "post",
401+
method: "POST",
402402
url: `/user/createWithArray`,
403403
data: data,
404404
...config
@@ -414,7 +414,7 @@ data: data,
414414
*/
415415
export async function createUsersWithListInput(data:Array<User>,config?:AxiosRequestConfig): AxiosPromise<unknown> {
416416
return axios({
417-
method: "post",
417+
method: "POST",
418418
url: `/user/createWithList`,
419419
data: data,
420420
...config
@@ -440,7 +440,7 @@ export async function loginUser(params:{
440440
"password":string;
441441
},config?:AxiosRequestConfig): AxiosPromise<string> {
442442
return axios({
443-
method: "get",
443+
method: "GET",
444444
url: `/user/login`,
445445
params: params,
446446
...config
@@ -455,7 +455,7 @@ params: params,
455455
*/
456456
export async function logoutUser(config?:AxiosRequestConfig): AxiosPromise<unknown> {
457457
return axios({
458-
method: "get",
458+
method: "GET",
459459
url: `/user/logout`,
460460
...config
461461
});
@@ -471,7 +471,7 @@ export async function logoutUser(config?:AxiosRequestConfig): AxiosPromise<unkno
471471
*/
472472
export async function getUserByName(username:string,config?:AxiosRequestConfig): AxiosPromise<User> {
473473
return axios({
474-
method: "get",
474+
method: "GET",
475475
url: `/user/${username}`,
476476
...config
477477
});
@@ -486,7 +486,7 @@ export async function getUserByName(username:string,config?:AxiosRequestConfig):
486486
*/
487487
export async function deleteUser(username:string,config?:AxiosRequestConfig): AxiosPromise<unknown> {
488488
return axios({
489-
method: "delete",
489+
method: "DELETE",
490490
url: `/user/${username}`,
491491
...config
492492
});
@@ -502,7 +502,7 @@ export async function deleteUser(username:string,config?:AxiosRequestConfig): Ax
502502
*/
503503
export async function updateUser(username:string,data:User,config?:AxiosRequestConfig): AxiosPromise<unknown> {
504504
return axios({
505-
method: "put",
505+
method: "PUT",
506506
url: `/user/${username}`,
507507
data: data,
508508
...config

test/example-dest/3.0/pet-store.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export type ApiResponse = {
191191
*/
192192
export async function addPet(data:Pet,config?:AxiosRequestConfig): AxiosPromise<Pet> {
193193
return axios({
194-
method: "post",
194+
method: "POST",
195195
url: `/pet`,
196196
data: data,
197197
...config
@@ -208,7 +208,7 @@ data: data,
208208
*/
209209
export async function updatePet(data:Pet,config?:AxiosRequestConfig): AxiosPromise<Pet> {
210210
return axios({
211-
method: "put",
211+
method: "PUT",
212212
url: `/pet`,
213213
data: data,
214214
...config
@@ -230,7 +230,7 @@ export async function findPetsByStatus(status?:
230230
("available"|"pending"|"sold")
231231
,config?:AxiosRequestConfig): AxiosPromise<Array<Pet>> {
232232
return axios({
233-
method: "get",
233+
method: "GET",
234234
url: `/pet/findByStatus`,
235235
params: {"status": status},
236236
...config
@@ -247,7 +247,7 @@ params: {"status": status},
247247
*/
248248
export async function findPetsByTags(tags?:Array<string>,config?:AxiosRequestConfig): AxiosPromise<Array<Pet>> {
249249
return axios({
250-
method: "get",
250+
method: "GET",
251251
url: `/pet/findByTags`,
252252
params: {"tags": tags},
253253
...config
@@ -269,7 +269,7 @@ export async function getPetById(petId:
269269
number
270270
,config?:AxiosRequestConfig): AxiosPromise<Pet> {
271271
return axios({
272-
method: "get",
272+
method: "GET",
273273
url: `/pet/${petId}`,
274274
...config
275275
});
@@ -299,7 +299,7 @@ number
299299
"status"?:string;
300300
},config?:AxiosRequestConfig): AxiosPromise<unknown> {
301301
return axios({
302-
method: "post",
302+
method: "POST",
303303
url: `/pet/${petId}`,
304304
params: params,
305305
...config
@@ -321,7 +321,7 @@ export async function deletePet(petId:
321321
number
322322
,apiKey?:string,config?:AxiosRequestConfig): AxiosPromise<unknown> {
323323
return axios({
324-
method: "delete",
324+
method: "DELETE",
325325
url: `/pet/${petId}`,
326326
headers: {"api_key": apiKey},
327327
...config
@@ -350,7 +350,7 @@ number
350350
Blob
351351
,additionalMetadata?:string,config?:AxiosRequestConfig): AxiosPromise<ApiResponse> {
352352
return axios({
353-
method: "post",
353+
method: "POST",
354354
url: `/pet/${petId}/uploadImage`,
355355
data: data,
356356
params: {"additionalMetadata": additionalMetadata},
@@ -372,7 +372,7 @@ export async function getInventory(config?:AxiosRequestConfig): AxiosPromise<{
372372
[key: string]:number;
373373
}> {
374374
return axios({
375-
method: "get",
375+
method: "GET",
376376
url: `/store/inventory`,
377377
...config
378378
});
@@ -388,7 +388,7 @@ export async function getInventory(config?:AxiosRequestConfig): AxiosPromise<{
388388
*/
389389
export async function placeOrder(data:Order,config?:AxiosRequestConfig): AxiosPromise<Order> {
390390
return axios({
391-
method: "post",
391+
method: "POST",
392392
url: `/store/order`,
393393
data: data,
394394
...config
@@ -410,7 +410,7 @@ export async function getOrderById(orderId:
410410
number
411411
,config?:AxiosRequestConfig): AxiosPromise<Order> {
412412
return axios({
413-
method: "get",
413+
method: "GET",
414414
url: `/store/order/${orderId}`,
415415
...config
416416
});
@@ -430,7 +430,7 @@ export async function deleteOrder(orderId:
430430
number
431431
,config?:AxiosRequestConfig): AxiosPromise<unknown> {
432432
return axios({
433-
method: "delete",
433+
method: "DELETE",
434434
url: `/store/order/${orderId}`,
435435
...config
436436
});
@@ -445,7 +445,7 @@ number
445445
*/
446446
export async function createUser(data:User,config?:AxiosRequestConfig): AxiosPromise<unknown> {
447447
return axios({
448-
method: "post",
448+
method: "POST",
449449
url: `/user`,
450450
data: data,
451451
...config
@@ -462,7 +462,7 @@ data: data,
462462
*/
463463
export async function createUsersWithListInput(data:Array<User>,config?:AxiosRequestConfig): AxiosPromise<User> {
464464
return axios({
465-
method: "post",
465+
method: "POST",
466466
url: `/user/createWithList`,
467467
data: data,
468468
...config
@@ -488,7 +488,7 @@ export async function loginUser(params?:{
488488
"password"?:string;
489489
},config?:AxiosRequestConfig): AxiosPromise<string> {
490490
return axios({
491-
method: "get",
491+
method: "GET",
492492
url: `/user/login`,
493493
params: params,
494494
...config
@@ -503,7 +503,7 @@ params: params,
503503
*/
504504
export async function logoutUser(config?:AxiosRequestConfig): AxiosPromise<unknown> {
505505
return axios({
506-
method: "get",
506+
method: "GET",
507507
url: `/user/logout`,
508508
...config
509509
});
@@ -519,7 +519,7 @@ export async function logoutUser(config?:AxiosRequestConfig): AxiosPromise<unkno
519519
*/
520520
export async function getUserByName(username:string,config?:AxiosRequestConfig): AxiosPromise<User> {
521521
return axios({
522-
method: "get",
522+
method: "GET",
523523
url: `/user/${username}`,
524524
...config
525525
});
@@ -534,7 +534,7 @@ export async function getUserByName(username:string,config?:AxiosRequestConfig):
534534
*/
535535
export async function deleteUser(username:string,config?:AxiosRequestConfig): AxiosPromise<unknown> {
536536
return axios({
537-
method: "delete",
537+
method: "DELETE",
538538
url: `/user/${username}`,
539539
...config
540540
});
@@ -550,7 +550,7 @@ export async function deleteUser(username:string,config?:AxiosRequestConfig): Ax
550550
*/
551551
export async function updateUser(username:string,data:User,config?:AxiosRequestConfig): AxiosPromise<unknown> {
552552
return axios({
553-
method: "put",
553+
method: "PUT",
554554
url: `/user/${username}`,
555555
data: data,
556556
...config

test/example-dest/3.1/pet-store.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Pet
120120
Pet
121121
> {
122122
return axios({
123-
method: "put",
123+
method: "PUT",
124124
url: `/pet`,
125125
data: data,
126126
...config
@@ -147,7 +147,7 @@ Pet
147147
Pet
148148
> {
149149
return axios({
150-
method: "post",
150+
method: "POST",
151151
url: `/pet`,
152152
data: data,
153153
...config
@@ -168,7 +168,7 @@ export async function getPetById(petId:
168168
number
169169
,config?:AxiosRequestConfig): AxiosPromise<unknown> {
170170
return axios({
171-
method: "get",
171+
method: "GET",
172172
url: `/pet/${petId}`,
173173
...config
174174
});

0 commit comments

Comments
 (0)