@@ -43,8 +43,12 @@ public function updatePet($body) {
43
43
$ queryParams = array ();
44
44
$ headerParams = array ();
45
45
$ formParams = array ();
46
- $ headerParams ['Accept ' ] = 'application/json,application/xml ' ;
47
- $ headerParams ['Content-Type ' ] = 'application/json,application/xml ' ;
46
+ $ _header_accept = 'application/json, application/xml ' ;
47
+ if ($ _header_accept !== '' ) {
48
+ $ headerParams ['Accept ' ] = $ _header_accept ;
49
+ }
50
+ $ _header_content_type = array ('application/json ' ,'application/xml ' );
51
+ $ headerParams ['Content-Type ' ] = count ($ _header_content_type ) > 0 ? $ _header_content_type [0 ] : 'application/json ' ;
48
52
49
53
50
54
@@ -88,8 +92,12 @@ public function addPet($body) {
88
92
$ queryParams = array ();
89
93
$ headerParams = array ();
90
94
$ formParams = array ();
91
- $ headerParams ['Accept ' ] = 'application/json,application/xml ' ;
92
- $ headerParams ['Content-Type ' ] = 'application/json,application/xml ' ;
95
+ $ _header_accept = 'application/json, application/xml ' ;
96
+ if ($ _header_accept !== '' ) {
97
+ $ headerParams ['Accept ' ] = $ _header_accept ;
98
+ }
99
+ $ _header_content_type = array ('application/json ' ,'application/xml ' );
100
+ $ headerParams ['Content-Type ' ] = count ($ _header_content_type ) > 0 ? $ _header_content_type [0 ] : 'application/json ' ;
93
101
94
102
95
103
@@ -133,8 +141,12 @@ public function findPetsByStatus($status) {
133
141
$ queryParams = array ();
134
142
$ headerParams = array ();
135
143
$ formParams = array ();
136
- $ headerParams ['Accept ' ] = 'application/json,application/xml ' ;
137
- $ headerParams ['Content-Type ' ] = '' ;
144
+ $ _header_accept = 'application/json, application/xml ' ;
145
+ if ($ _header_accept !== '' ) {
146
+ $ headerParams ['Accept ' ] = $ _header_accept ;
147
+ }
148
+ $ _header_content_type = array ();
149
+ $ headerParams ['Content-Type ' ] = count ($ _header_content_type ) > 0 ? $ _header_content_type [0 ] : 'application/json ' ;
138
150
139
151
// query params
140
152
if ($ status !== null ) {
@@ -183,8 +195,12 @@ public function findPetsByTags($tags) {
183
195
$ queryParams = array ();
184
196
$ headerParams = array ();
185
197
$ formParams = array ();
186
- $ headerParams ['Accept ' ] = 'application/json,application/xml ' ;
187
- $ headerParams ['Content-Type ' ] = '' ;
198
+ $ _header_accept = 'application/json, application/xml ' ;
199
+ if ($ _header_accept !== '' ) {
200
+ $ headerParams ['Accept ' ] = $ _header_accept ;
201
+ }
202
+ $ _header_content_type = array ();
203
+ $ headerParams ['Content-Type ' ] = count ($ _header_content_type ) > 0 ? $ _header_content_type [0 ] : 'application/json ' ;
188
204
189
205
// query params
190
206
if ($ tags !== null ) {
@@ -233,8 +249,12 @@ public function getPetById($pet_id) {
233
249
$ queryParams = array ();
234
250
$ headerParams = array ();
235
251
$ formParams = array ();
236
- $ headerParams ['Accept ' ] = 'application/json,application/xml ' ;
237
- $ headerParams ['Content-Type ' ] = '' ;
252
+ $ _header_accept = 'application/json, application/xml ' ;
253
+ if ($ _header_accept !== '' ) {
254
+ $ headerParams ['Accept ' ] = $ _header_accept ;
255
+ }
256
+ $ _header_content_type = array ();
257
+ $ headerParams ['Content-Type ' ] = count ($ _header_content_type ) > 0 ? $ _header_content_type [0 ] : 'application/json ' ;
238
258
239
259
240
260
@@ -286,8 +306,12 @@ public function updatePetWithForm($pet_id, $name, $status) {
286
306
$ queryParams = array ();
287
307
$ headerParams = array ();
288
308
$ formParams = array ();
289
- $ headerParams ['Accept ' ] = 'application/json,application/xml ' ;
290
- $ headerParams ['Content-Type ' ] = 'application/x-www-form-urlencoded ' ;
309
+ $ _header_accept = 'application/json, application/xml ' ;
310
+ if ($ _header_accept !== '' ) {
311
+ $ headerParams ['Accept ' ] = $ _header_accept ;
312
+ }
313
+ $ _header_content_type = array ('application/x-www-form-urlencoded ' );
314
+ $ headerParams ['Content-Type ' ] = count ($ _header_content_type ) > 0 ? $ _header_content_type [0 ] : 'application/json ' ;
291
315
292
316
293
317
@@ -338,8 +362,12 @@ public function deletePet($api_key, $pet_id) {
338
362
$ queryParams = array ();
339
363
$ headerParams = array ();
340
364
$ formParams = array ();
341
- $ headerParams ['Accept ' ] = 'application/json,application/xml ' ;
342
- $ headerParams ['Content-Type ' ] = '' ;
365
+ $ _header_accept = 'application/json, application/xml ' ;
366
+ if ($ _header_accept !== '' ) {
367
+ $ headerParams ['Accept ' ] = $ _header_accept ;
368
+ }
369
+ $ _header_content_type = array ();
370
+ $ headerParams ['Content-Type ' ] = count ($ _header_content_type ) > 0 ? $ _header_content_type [0 ] : 'application/json ' ;
343
371
344
372
345
373
// header params
@@ -388,8 +416,12 @@ public function uploadFile($pet_id, $additional_metadata, $file) {
388
416
$ queryParams = array ();
389
417
$ headerParams = array ();
390
418
$ formParams = array ();
391
- $ headerParams ['Accept ' ] = 'application/json,application/xml ' ;
392
- $ headerParams ['Content-Type ' ] = 'multipart/form-data ' ;
419
+ $ _header_accept = 'application/json, application/xml ' ;
420
+ if ($ _header_accept !== '' ) {
421
+ $ headerParams ['Accept ' ] = $ _header_accept ;
422
+ }
423
+ $ _header_content_type = array ('multipart/form-data ' );
424
+ $ headerParams ['Content-Type ' ] = count ($ _header_content_type ) > 0 ? $ _header_content_type [0 ] : 'application/json ' ;
393
425
394
426
395
427
0 commit comments