@@ -54,7 +54,42 @@ export default function() {
54
54
sleep ( SLEEP_DURATION ) ;
55
55
}
56
56
57
- // Request No. 2: testClientModel
57
+ // Request No. 2: testEndpointParameters
58
+ {
59
+ let url = BASE_URL + `/fake` ;
60
+ // TODO: edit the parameters of the request body.
61
+ let body = { "integer" : "integer" , "int32" : "integer" , "int64" : "long" , "number" : "bigdecimal" , "float" : "float" , "double" : "double" , "string" : "string" , "patternWithoutDelimiter" : "string" , "byte" : "byte[]" , "binary" : http . file ( open ( "/path/to/file.bin" , "b" ) , "test.bin" ) , "date" : "date" , "dateTime" : "date" , "password" : "string" , "callback" : "string" } ;
62
+ let params = {
63
+ headers : {
64
+ "Content-Type" : "application/x-www-form-urlencoded" , "global_api_key_header" : `${ globalApiKeyHeader } ` , "Accept" : "application/json"
65
+ } , cookies : {
66
+ "global_api_key_cookie" : `${ globalApiKeyCookie } `
67
+ }
68
+ } ;
69
+ let request = http . post ( url , JSON . stringify ( body ) , params ) ;
70
+
71
+
72
+ sleep ( SLEEP_DURATION ) ;
73
+ }
74
+
75
+ // Request No. 3: testGroupParameters
76
+ {
77
+ let url = BASE_URL + `/fake?required_string_group=${ required_string_group } &required_int64_group=${ required_int64_group } &string_group=${ string_group } &int64_group=${ int64_group } ` ;
78
+ let params = {
79
+ headers : {
80
+ "required_boolean_group" : `${ requiredBooleanGroup } ` , "boolean_group" : `${ booleanGroup } ` , "global_api_key_header" : `${ globalApiKeyHeader } ` , "Accept" : "application/json"
81
+ } , cookies : {
82
+ "global_api_key_cookie" : `${ globalApiKeyCookie } `
83
+ }
84
+ } ;
85
+ // this is a DELETE method request - if params are also set, empty body must be passed
86
+ let request = http . del ( url , { } , params ) ;
87
+
88
+
89
+ sleep ( SLEEP_DURATION ) ;
90
+ }
91
+
92
+ // Request No. 4: testClientModel
58
93
{
59
94
let url = BASE_URL + `/fake` ;
60
95
// TODO: edit the parameters of the request body.
@@ -203,7 +238,25 @@ export default function() {
203
238
sleep ( SLEEP_DURATION ) ;
204
239
}
205
240
206
- // Request No. 2: deleteUser
241
+ // Request No. 2: updateUser
242
+ {
243
+ let url = BASE_URL + `/user/${ username } ` ;
244
+ // TODO: edit the parameters of the request body.
245
+ let body = { "id" : "long" , "username" : "string" , "firstName" : "string" , "lastName" : "string" , "email" : "string" , "password" : "string" , "phone" : "string" , "userStatus" : "integer" } ;
246
+ let params = {
247
+ headers : {
248
+ "Content-Type" : "application/json" , "global_api_key_header" : `${ globalApiKeyHeader } ` , "Accept" : "application/json"
249
+ } , cookies : {
250
+ "global_api_key_cookie" : `${ globalApiKeyCookie } `
251
+ }
252
+ } ;
253
+ let request = http . put ( url , JSON . stringify ( body ) , params ) ;
254
+
255
+
256
+ sleep ( SLEEP_DURATION ) ;
257
+ }
258
+
259
+ // Request No. 3: deleteUser
207
260
{
208
261
let url = BASE_URL + `/user/${ username } ` ;
209
262
let params = {
@@ -474,7 +527,28 @@ export default function() {
474
527
sleep ( SLEEP_DURATION ) ;
475
528
}
476
529
477
- // Request No. 2: deletePet
530
+ // Request No. 2: updatePetWithForm
531
+ {
532
+ let url = BASE_URL + `/pet/${ petId } ` ;
533
+ // TODO: edit the parameters of the request body.
534
+ let body = { "name" : "string" , "status" : "string" } ;
535
+ let params = {
536
+ headers : {
537
+ "Content-Type" : "application/x-www-form-urlencoded" , "global_api_key_header" : `${ globalApiKeyHeader } ` , "Accept" : "application/json"
538
+ } , cookies : {
539
+ "global_api_key_cookie" : `${ globalApiKeyCookie } `
540
+ }
541
+ } ;
542
+ let request = http . post ( url , JSON . stringify ( body ) , params ) ;
543
+
544
+ check ( request , {
545
+ "Successful operation" : ( r ) => r . status === 200
546
+ } ) ;
547
+
548
+ sleep ( SLEEP_DURATION ) ;
549
+ }
550
+
551
+ // Request No. 3: deletePet
478
552
{
479
553
let url = BASE_URL + `/pet/${ petId } ` ;
480
554
let params = {
0 commit comments