minor enhancement to c client generaotr (#4457)

This commit is contained in:
William Cheng
2019-11-13 13:34:31 +08:00
committed by GitHub
parent 440e3f301d
commit fa1e003a3b
10 changed files with 34 additions and 25 deletions

View File

@@ -351,7 +351,7 @@ pet_t *PetAPI_getPetById(apiClient_t *apiClient, long petId) {
// nonprimitive not container
cJSON *PetAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
pet_t *elementToReturn = pet_parseFromJSON(PetAPIlocalVarJSON);
cJSON_Delete(PetAPIlocalVarJSON);
cJSON_Delete(PetAPIlocalVarJSON);
if(elementToReturn == NULL) {
// return 0;
}
@@ -606,7 +606,7 @@ api_response_t *PetAPI_uploadFile(apiClient_t *apiClient, long petId,
cJSON *PetAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
api_response_t *elementToReturn = api_response_parseFromJSON(
PetAPIlocalVarJSON);
cJSON_Delete(PetAPIlocalVarJSON);
cJSON_Delete(PetAPIlocalVarJSON);
if(elementToReturn == NULL) {
// return 0;
}