@@ -66,6 +66,7 @@ PetAPI_addPet(apiClient_t *apiClient, pet_t *body)
66
66
list_t * localVarHeaderType = NULL ;
67
67
list_t * localVarContentType = list_createList ();
68
68
char * localVarBodyParameters = NULL ;
69
+ size_t localVarBodyLength = 0 ;
69
70
70
71
// clear the error code from the previous api call
71
72
apiClient -> response_code = 0 ;
@@ -83,9 +84,10 @@ PetAPI_addPet(apiClient_t *apiClient, pet_t *body)
83
84
cJSON * localVarSingleItemJSON_body = NULL ;
84
85
if (body != NULL )
85
86
{
86
- //string
87
+ //not string, not binary
87
88
localVarSingleItemJSON_body = pet_convertToJSON (body );
88
89
localVarBodyParameters = cJSON_PrintUnformatted (localVarSingleItemJSON_body );
90
+ localVarBodyLength = strlen (localVarBodyParameters );
89
91
}
90
92
list_addElement (localVarContentType ,"application/json" ); //consumes
91
93
list_addElement (localVarContentType ,"application/xml" ); //consumes
@@ -97,6 +99,7 @@ PetAPI_addPet(apiClient_t *apiClient, pet_t *body)
97
99
localVarHeaderType ,
98
100
localVarContentType ,
99
101
localVarBodyParameters ,
102
+ localVarBodyLength ,
100
103
"POST" );
101
104
102
105
// uncomment below to debug the error response
@@ -135,6 +138,7 @@ PetAPI_deletePet(apiClient_t *apiClient, long petId, char *api_key)
135
138
list_t * localVarHeaderType = NULL ;
136
139
list_t * localVarContentType = NULL ;
137
140
char * localVarBodyParameters = NULL ;
141
+ size_t localVarBodyLength = 0 ;
138
142
139
143
// clear the error code from the previous api call
140
144
apiClient -> response_code = 0 ;
@@ -181,6 +185,7 @@ PetAPI_deletePet(apiClient_t *apiClient, long petId, char *api_key)
181
185
localVarHeaderType ,
182
186
localVarContentType ,
183
187
localVarBodyParameters ,
188
+ localVarBodyLength ,
184
189
"DELETE" );
185
190
186
191
// uncomment below to debug the error response
@@ -226,6 +231,7 @@ PetAPI_findPetsByStatus(apiClient_t *apiClient, list_t *status)
226
231
list_t * localVarHeaderType = list_createList ();
227
232
list_t * localVarContentType = NULL ;
228
233
char * localVarBodyParameters = NULL ;
234
+ size_t localVarBodyLength = 0 ;
229
235
230
236
// clear the error code from the previous api call
231
237
apiClient -> response_code = 0 ;
@@ -254,6 +260,7 @@ PetAPI_findPetsByStatus(apiClient_t *apiClient, list_t *status)
254
260
localVarHeaderType ,
255
261
localVarContentType ,
256
262
localVarBodyParameters ,
263
+ localVarBodyLength ,
257
264
"GET" );
258
265
259
266
// uncomment below to debug the error response
@@ -317,6 +324,7 @@ PetAPI_findPetsByTags(apiClient_t *apiClient, list_t *tags)
317
324
list_t * localVarHeaderType = list_createList ();
318
325
list_t * localVarContentType = NULL ;
319
326
char * localVarBodyParameters = NULL ;
327
+ size_t localVarBodyLength = 0 ;
320
328
321
329
// clear the error code from the previous api call
322
330
apiClient -> response_code = 0 ;
@@ -345,6 +353,7 @@ PetAPI_findPetsByTags(apiClient_t *apiClient, list_t *tags)
345
353
localVarHeaderType ,
346
354
localVarContentType ,
347
355
localVarBodyParameters ,
356
+ localVarBodyLength ,
348
357
"GET" );
349
358
350
359
// uncomment below to debug the error response
@@ -406,6 +415,7 @@ PetAPI_getDaysWithoutIncident(apiClient_t *apiClient)
406
415
list_t * localVarHeaderType = list_createList ();
407
416
list_t * localVarContentType = NULL ;
408
417
char * localVarBodyParameters = NULL ;
418
+ size_t localVarBodyLength = 0 ;
409
419
410
420
// clear the error code from the previous api call
411
421
apiClient -> response_code = 0 ;
@@ -427,6 +437,7 @@ PetAPI_getDaysWithoutIncident(apiClient_t *apiClient)
427
437
localVarHeaderType ,
428
438
localVarContentType ,
429
439
localVarBodyParameters ,
440
+ localVarBodyLength ,
430
441
"GET" );
431
442
432
443
// uncomment below to debug the error response
@@ -469,6 +480,7 @@ PetAPI_getPetById(apiClient_t *apiClient, long petId)
469
480
list_t * localVarHeaderType = list_createList ();
470
481
list_t * localVarContentType = NULL ;
471
482
char * localVarBodyParameters = NULL ;
483
+ size_t localVarBodyLength = 0 ;
472
484
473
485
// clear the error code from the previous api call
474
486
apiClient -> response_code = 0 ;
@@ -505,6 +517,7 @@ PetAPI_getPetById(apiClient_t *apiClient, long petId)
505
517
localVarHeaderType ,
506
518
localVarContentType ,
507
519
localVarBodyParameters ,
520
+ localVarBodyLength ,
508
521
"GET" );
509
522
510
523
// uncomment below to debug the error response
@@ -561,6 +574,7 @@ PetAPI_getPicture(apiClient_t *apiClient)
561
574
list_t * localVarHeaderType = list_createList ();
562
575
list_t * localVarContentType = NULL ;
563
576
char * localVarBodyParameters = NULL ;
577
+ size_t localVarBodyLength = 0 ;
564
578
565
579
// clear the error code from the previous api call
566
580
apiClient -> response_code = 0 ;
@@ -582,6 +596,7 @@ PetAPI_getPicture(apiClient_t *apiClient)
582
596
localVarHeaderType ,
583
597
localVarContentType ,
584
598
localVarBodyParameters ,
599
+ localVarBodyLength ,
585
600
"GET" );
586
601
587
602
// uncomment below to debug the error response
@@ -622,6 +637,7 @@ PetAPI_isPetAvailable(apiClient_t *apiClient, long petId)
622
637
list_t * localVarHeaderType = list_createList ();
623
638
list_t * localVarContentType = NULL ;
624
639
char * localVarBodyParameters = NULL ;
640
+ size_t localVarBodyLength = 0 ;
625
641
626
642
// clear the error code from the previous api call
627
643
apiClient -> response_code = 0 ;
@@ -657,6 +673,7 @@ PetAPI_isPetAvailable(apiClient_t *apiClient, long petId)
657
673
localVarHeaderType ,
658
674
localVarContentType ,
659
675
localVarBodyParameters ,
676
+ localVarBodyLength ,
660
677
"POST" );
661
678
662
679
// uncomment below to debug the error response
@@ -697,14 +714,15 @@ PetAPI_isPetAvailable(apiClient_t *apiClient, long petId)
697
714
// Send a picture of your happy pet
698
715
//
699
716
char *
700
- PetAPI_sharePicture (apiClient_t * apiClient , char * picture )
717
+ PetAPI_sharePicture (apiClient_t * apiClient , binary_t * picture )
701
718
{
702
719
list_t * localVarQueryParameters = NULL ;
703
720
list_t * localVarHeaderParameters = NULL ;
704
721
list_t * localVarFormParameters = NULL ;
705
722
list_t * localVarHeaderType = list_createList ();
706
723
list_t * localVarContentType = NULL ;
707
724
char * localVarBodyParameters = NULL ;
725
+ size_t localVarBodyLength = 0 ;
708
726
709
727
// clear the error code from the previous api call
710
728
apiClient -> response_code = 0 ;
@@ -719,7 +737,9 @@ PetAPI_sharePicture(apiClient_t *apiClient, char *picture)
719
737
720
738
721
739
// Body Param
722
- localVarBodyParameters = strdup (picture );
740
+ localVarBodyParameters = malloc (picture -> len );
741
+ memcpy (localVarBodyParameters , picture -> data , picture -> len );
742
+ localVarBodyLength = picture -> len ;
723
743
list_addElement (localVarHeaderType ,"*/*" ); //produces
724
744
apiClient_invoke (apiClient ,
725
745
localVarPath ,
@@ -729,6 +749,7 @@ PetAPI_sharePicture(apiClient_t *apiClient, char *picture)
729
749
localVarHeaderType ,
730
750
localVarContentType ,
731
751
localVarBodyParameters ,
752
+ localVarBodyLength ,
732
753
"POST" );
733
754
734
755
// uncomment below to debug the error response
@@ -772,6 +793,7 @@ PetAPI_specialtyPet(apiClient_t *apiClient)
772
793
list_t * localVarHeaderType = list_createList ();
773
794
list_t * localVarContentType = NULL ;
774
795
char * localVarBodyParameters = NULL ;
796
+ size_t localVarBodyLength = 0 ;
775
797
776
798
// clear the error code from the previous api call
777
799
apiClient -> response_code = 0 ;
@@ -794,6 +816,7 @@ PetAPI_specialtyPet(apiClient_t *apiClient)
794
816
localVarHeaderType ,
795
817
localVarContentType ,
796
818
localVarBodyParameters ,
819
+ localVarBodyLength ,
797
820
"GET" );
798
821
799
822
// uncomment below to debug the error response
@@ -841,6 +864,7 @@ PetAPI_updatePet(apiClient_t *apiClient, pet_t *body)
841
864
list_t * localVarHeaderType = NULL ;
842
865
list_t * localVarContentType = list_createList ();
843
866
char * localVarBodyParameters = NULL ;
867
+ size_t localVarBodyLength = 0 ;
844
868
845
869
// clear the error code from the previous api call
846
870
apiClient -> response_code = 0 ;
@@ -858,9 +882,10 @@ PetAPI_updatePet(apiClient_t *apiClient, pet_t *body)
858
882
cJSON * localVarSingleItemJSON_body = NULL ;
859
883
if (body != NULL )
860
884
{
861
- //string
885
+ //not string, not binary
862
886
localVarSingleItemJSON_body = pet_convertToJSON (body );
863
887
localVarBodyParameters = cJSON_PrintUnformatted (localVarSingleItemJSON_body );
888
+ localVarBodyLength = strlen (localVarBodyParameters );
864
889
}
865
890
list_addElement (localVarContentType ,"application/json" ); //consumes
866
891
list_addElement (localVarContentType ,"application/xml" ); //consumes
@@ -872,6 +897,7 @@ PetAPI_updatePet(apiClient_t *apiClient, pet_t *body)
872
897
localVarHeaderType ,
873
898
localVarContentType ,
874
899
localVarBodyParameters ,
900
+ localVarBodyLength ,
875
901
"PUT" );
876
902
877
903
// uncomment below to debug the error response
@@ -918,6 +944,7 @@ PetAPI_updatePetWithForm(apiClient_t *apiClient, long petId, char *name, char *s
918
944
list_t * localVarHeaderType = NULL ;
919
945
list_t * localVarContentType = list_createList ();
920
946
char * localVarBodyParameters = NULL ;
947
+ size_t localVarBodyLength = 0 ;
921
948
922
949
// clear the error code from the previous api call
923
950
apiClient -> response_code = 0 ;
@@ -977,6 +1004,7 @@ PetAPI_updatePetWithForm(apiClient_t *apiClient, long petId, char *name, char *s
977
1004
localVarHeaderType ,
978
1005
localVarContentType ,
979
1006
localVarBodyParameters ,
1007
+ localVarBodyLength ,
980
1008
"POST" );
981
1009
982
1010
// uncomment below to debug the error response
@@ -1029,6 +1057,7 @@ PetAPI_uploadFile(apiClient_t *apiClient, long petId, char *additionalMetadata,
1029
1057
list_t * localVarHeaderType = list_createList ();
1030
1058
list_t * localVarContentType = list_createList ();
1031
1059
char * localVarBodyParameters = NULL ;
1060
+ size_t localVarBodyLength = 0 ;
1032
1061
1033
1062
// clear the error code from the previous api call
1034
1063
apiClient -> response_code = 0 ;
@@ -1089,6 +1118,7 @@ PetAPI_uploadFile(apiClient_t *apiClient, long petId, char *additionalMetadata,
1089
1118
localVarHeaderType ,
1090
1119
localVarContentType ,
1091
1120
localVarBodyParameters ,
1121
+ localVarBodyLength ,
1092
1122
"POST" );
1093
1123
1094
1124
// uncomment below to debug the error response
0 commit comments