Created by: zhemant
PR checklist
-
Read the contribution guidelines. -
Ran the shell script under ./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
. -
Filed the PR against the correct branch: master
,3.3.x
,4.0.x
. Default:master
. -
Copied the technical committee to review the pull request if your PR is targeting a particular programming language.
Description of the PR
- Updated Petstore Sample (working test: add , delete, getbyId, getbystatus,uploadimage. Not working:update with form param)
- Added code to upload image
- added code to send form param
- set debug flag in cmakelist
- In apiClient.c modified curl_mime function to handle formparameter and file upload
- in apiClient.h added struct ImageContainer to pass image pointer and size of image from API to curl functions in apiClient.c
- added code to ignore content type: application/xml in apiClient.c and accept only application/json.
- added code for produces and consumes in api-body mustache
- removed parameter operation name from api_invoke function
- added two list parameters localVarHeaderType and localVarContentType to pass header type and content type to curl functions in apiClient.c
- test cases added to test PetAPI in test-PetAPI.
- added verbose mode to curl to see the http headers for debugging