forked from loafle/openapi-generator-original
comment out error message debug (#12056)
This commit is contained in:
parent
a7e92786df
commit
66db259678
@ -326,9 +326,10 @@ end:
|
|||||||
"{{{httpMethod}}}");
|
"{{{httpMethod}}}");
|
||||||
|
|
||||||
{{#responses}}
|
{{#responses}}
|
||||||
if (apiClient->response_code == {{code}}) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","{{message}}");
|
//if (apiClient->response_code == {{code}}) {
|
||||||
}
|
// printf("%s\n","{{message}}");
|
||||||
|
//}
|
||||||
{{/responses}}
|
{{/responses}}
|
||||||
{{#returnType}}
|
{{#returnType}}
|
||||||
{{#returnTypeIsPrimitive}}
|
{{#returnTypeIsPrimitive}}
|
||||||
|
@ -95,9 +95,10 @@ PetAPI_addPet(apiClient_t *apiClient, pet_t * body )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"POST");
|
"POST");
|
||||||
|
|
||||||
if (apiClient->response_code == 405) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","Invalid input");
|
//if (apiClient->response_code == 405) {
|
||||||
}
|
// printf("%s\n","Invalid input");
|
||||||
|
//}
|
||||||
//No return type
|
//No return type
|
||||||
end:
|
end:
|
||||||
if (apiClient->dataReceived) {
|
if (apiClient->dataReceived) {
|
||||||
@ -174,9 +175,10 @@ PetAPI_deletePet(apiClient_t *apiClient, long petId , char * api_key )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"DELETE");
|
"DELETE");
|
||||||
|
|
||||||
if (apiClient->response_code == 400) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","Invalid pet value");
|
//if (apiClient->response_code == 400) {
|
||||||
}
|
// printf("%s\n","Invalid pet value");
|
||||||
|
//}
|
||||||
//No return type
|
//No return type
|
||||||
end:
|
end:
|
||||||
if (apiClient->dataReceived) {
|
if (apiClient->dataReceived) {
|
||||||
@ -242,12 +244,14 @@ PetAPI_findPetsByStatus(apiClient_t *apiClient, list_t * status )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"GET");
|
"GET");
|
||||||
|
|
||||||
if (apiClient->response_code == 200) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","successful operation");
|
//if (apiClient->response_code == 200) {
|
||||||
}
|
// printf("%s\n","successful operation");
|
||||||
if (apiClient->response_code == 400) {
|
//}
|
||||||
printf("%s\n","Invalid status value");
|
// uncomment below to debug the error response
|
||||||
}
|
//if (apiClient->response_code == 400) {
|
||||||
|
// printf("%s\n","Invalid status value");
|
||||||
|
//}
|
||||||
cJSON *PetAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
|
cJSON *PetAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
|
||||||
if(!cJSON_IsArray(PetAPIlocalVarJSON)) {
|
if(!cJSON_IsArray(PetAPIlocalVarJSON)) {
|
||||||
return 0;//nonprimitive container
|
return 0;//nonprimitive container
|
||||||
@ -324,12 +328,14 @@ PetAPI_findPetsByTags(apiClient_t *apiClient, list_t * tags )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"GET");
|
"GET");
|
||||||
|
|
||||||
if (apiClient->response_code == 200) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","successful operation");
|
//if (apiClient->response_code == 200) {
|
||||||
}
|
// printf("%s\n","successful operation");
|
||||||
if (apiClient->response_code == 400) {
|
//}
|
||||||
printf("%s\n","Invalid tag value");
|
// uncomment below to debug the error response
|
||||||
}
|
//if (apiClient->response_code == 400) {
|
||||||
|
// printf("%s\n","Invalid tag value");
|
||||||
|
//}
|
||||||
cJSON *PetAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
|
cJSON *PetAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
|
||||||
if(!cJSON_IsArray(PetAPIlocalVarJSON)) {
|
if(!cJSON_IsArray(PetAPIlocalVarJSON)) {
|
||||||
return 0;//nonprimitive container
|
return 0;//nonprimitive container
|
||||||
@ -414,15 +420,18 @@ PetAPI_getPetById(apiClient_t *apiClient, long petId )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"GET");
|
"GET");
|
||||||
|
|
||||||
if (apiClient->response_code == 200) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","successful operation");
|
//if (apiClient->response_code == 200) {
|
||||||
}
|
// printf("%s\n","successful operation");
|
||||||
if (apiClient->response_code == 400) {
|
//}
|
||||||
printf("%s\n","Invalid ID supplied");
|
// uncomment below to debug the error response
|
||||||
}
|
//if (apiClient->response_code == 400) {
|
||||||
if (apiClient->response_code == 404) {
|
// printf("%s\n","Invalid ID supplied");
|
||||||
printf("%s\n","Pet not found");
|
//}
|
||||||
}
|
// uncomment below to debug the error response
|
||||||
|
//if (apiClient->response_code == 404) {
|
||||||
|
// printf("%s\n","Pet not found");
|
||||||
|
//}
|
||||||
//nonprimitive not container
|
//nonprimitive not container
|
||||||
cJSON *PetAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
|
cJSON *PetAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
|
||||||
pet_t *elementToReturn = pet_parseFromJSON(PetAPIlocalVarJSON);
|
pet_t *elementToReturn = pet_parseFromJSON(PetAPIlocalVarJSON);
|
||||||
@ -491,15 +500,18 @@ PetAPI_updatePet(apiClient_t *apiClient, pet_t * body )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"PUT");
|
"PUT");
|
||||||
|
|
||||||
if (apiClient->response_code == 400) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","Invalid ID supplied");
|
//if (apiClient->response_code == 400) {
|
||||||
}
|
// printf("%s\n","Invalid ID supplied");
|
||||||
if (apiClient->response_code == 404) {
|
//}
|
||||||
printf("%s\n","Pet not found");
|
// uncomment below to debug the error response
|
||||||
}
|
//if (apiClient->response_code == 404) {
|
||||||
if (apiClient->response_code == 405) {
|
// printf("%s\n","Pet not found");
|
||||||
printf("%s\n","Validation exception");
|
//}
|
||||||
}
|
// uncomment below to debug the error response
|
||||||
|
//if (apiClient->response_code == 405) {
|
||||||
|
// printf("%s\n","Validation exception");
|
||||||
|
//}
|
||||||
//No return type
|
//No return type
|
||||||
end:
|
end:
|
||||||
if (apiClient->dataReceived) {
|
if (apiClient->dataReceived) {
|
||||||
@ -589,9 +601,10 @@ PetAPI_updatePetWithForm(apiClient_t *apiClient, long petId , char * name , char
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"POST");
|
"POST");
|
||||||
|
|
||||||
if (apiClient->response_code == 405) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","Invalid input");
|
//if (apiClient->response_code == 405) {
|
||||||
}
|
// printf("%s\n","Invalid input");
|
||||||
|
//}
|
||||||
//No return type
|
//No return type
|
||||||
end:
|
end:
|
||||||
if (apiClient->dataReceived) {
|
if (apiClient->dataReceived) {
|
||||||
@ -696,9 +709,10 @@ PetAPI_uploadFile(apiClient_t *apiClient, long petId , char * additionalMetadata
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"POST");
|
"POST");
|
||||||
|
|
||||||
if (apiClient->response_code == 200) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","successful operation");
|
//if (apiClient->response_code == 200) {
|
||||||
}
|
// printf("%s\n","successful operation");
|
||||||
|
//}
|
||||||
//nonprimitive not container
|
//nonprimitive not container
|
||||||
cJSON *PetAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
|
cJSON *PetAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
|
||||||
api_response_t *elementToReturn = api_response_parseFromJSON(PetAPIlocalVarJSON);
|
api_response_t *elementToReturn = api_response_parseFromJSON(PetAPIlocalVarJSON);
|
||||||
|
@ -53,12 +53,14 @@ StoreAPI_deleteOrder(apiClient_t *apiClient, char * orderId )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"DELETE");
|
"DELETE");
|
||||||
|
|
||||||
if (apiClient->response_code == 400) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","Invalid ID supplied");
|
//if (apiClient->response_code == 400) {
|
||||||
}
|
// printf("%s\n","Invalid ID supplied");
|
||||||
if (apiClient->response_code == 404) {
|
//}
|
||||||
printf("%s\n","Order not found");
|
// uncomment below to debug the error response
|
||||||
}
|
//if (apiClient->response_code == 404) {
|
||||||
|
// printf("%s\n","Order not found");
|
||||||
|
//}
|
||||||
//No return type
|
//No return type
|
||||||
end:
|
end:
|
||||||
if (apiClient->dataReceived) {
|
if (apiClient->dataReceived) {
|
||||||
@ -108,9 +110,10 @@ StoreAPI_getInventory(apiClient_t *apiClient)
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"GET");
|
"GET");
|
||||||
|
|
||||||
if (apiClient->response_code == 200) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","successful operation");
|
//if (apiClient->response_code == 200) {
|
||||||
}
|
// printf("%s\n","successful operation");
|
||||||
|
//}
|
||||||
//primitive return type not simple
|
//primitive return type not simple
|
||||||
cJSON *localVarJSON = cJSON_Parse(apiClient->dataReceived);
|
cJSON *localVarJSON = cJSON_Parse(apiClient->dataReceived);
|
||||||
cJSON *VarJSON;
|
cJSON *VarJSON;
|
||||||
@ -186,15 +189,18 @@ StoreAPI_getOrderById(apiClient_t *apiClient, long orderId )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"GET");
|
"GET");
|
||||||
|
|
||||||
if (apiClient->response_code == 200) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","successful operation");
|
//if (apiClient->response_code == 200) {
|
||||||
}
|
// printf("%s\n","successful operation");
|
||||||
if (apiClient->response_code == 400) {
|
//}
|
||||||
printf("%s\n","Invalid ID supplied");
|
// uncomment below to debug the error response
|
||||||
}
|
//if (apiClient->response_code == 400) {
|
||||||
if (apiClient->response_code == 404) {
|
// printf("%s\n","Invalid ID supplied");
|
||||||
printf("%s\n","Order not found");
|
//}
|
||||||
}
|
// uncomment below to debug the error response
|
||||||
|
//if (apiClient->response_code == 404) {
|
||||||
|
// printf("%s\n","Order not found");
|
||||||
|
//}
|
||||||
//nonprimitive not container
|
//nonprimitive not container
|
||||||
cJSON *StoreAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
|
cJSON *StoreAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
|
||||||
order_t *elementToReturn = order_parseFromJSON(StoreAPIlocalVarJSON);
|
order_t *elementToReturn = order_parseFromJSON(StoreAPIlocalVarJSON);
|
||||||
@ -263,12 +269,14 @@ StoreAPI_placeOrder(apiClient_t *apiClient, order_t * body )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"POST");
|
"POST");
|
||||||
|
|
||||||
if (apiClient->response_code == 200) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","successful operation");
|
//if (apiClient->response_code == 200) {
|
||||||
}
|
// printf("%s\n","successful operation");
|
||||||
if (apiClient->response_code == 400) {
|
//}
|
||||||
printf("%s\n","Invalid Order");
|
// uncomment below to debug the error response
|
||||||
}
|
//if (apiClient->response_code == 400) {
|
||||||
|
// printf("%s\n","Invalid Order");
|
||||||
|
//}
|
||||||
//nonprimitive not container
|
//nonprimitive not container
|
||||||
cJSON *StoreAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
|
cJSON *StoreAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
|
||||||
order_t *elementToReturn = order_parseFromJSON(StoreAPIlocalVarJSON);
|
order_t *elementToReturn = order_parseFromJSON(StoreAPIlocalVarJSON);
|
||||||
|
@ -52,9 +52,10 @@ UserAPI_createUser(apiClient_t *apiClient, user_t * body )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"POST");
|
"POST");
|
||||||
|
|
||||||
if (apiClient->response_code == 0) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","successful operation");
|
//if (apiClient->response_code == 0) {
|
||||||
}
|
// printf("%s\n","successful operation");
|
||||||
|
//}
|
||||||
//No return type
|
//No return type
|
||||||
end:
|
end:
|
||||||
if (apiClient->dataReceived) {
|
if (apiClient->dataReceived) {
|
||||||
@ -134,9 +135,10 @@ UserAPI_createUsersWithArrayInput(apiClient_t *apiClient, list_t * body )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"POST");
|
"POST");
|
||||||
|
|
||||||
if (apiClient->response_code == 0) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","successful operation");
|
//if (apiClient->response_code == 0) {
|
||||||
}
|
// printf("%s\n","successful operation");
|
||||||
|
//}
|
||||||
//No return type
|
//No return type
|
||||||
end:
|
end:
|
||||||
if (apiClient->dataReceived) {
|
if (apiClient->dataReceived) {
|
||||||
@ -224,9 +226,10 @@ UserAPI_createUsersWithListInput(apiClient_t *apiClient, list_t * body )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"POST");
|
"POST");
|
||||||
|
|
||||||
if (apiClient->response_code == 0) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","successful operation");
|
//if (apiClient->response_code == 0) {
|
||||||
}
|
// printf("%s\n","successful operation");
|
||||||
|
//}
|
||||||
//No return type
|
//No return type
|
||||||
end:
|
end:
|
||||||
if (apiClient->dataReceived) {
|
if (apiClient->dataReceived) {
|
||||||
@ -297,12 +300,14 @@ UserAPI_deleteUser(apiClient_t *apiClient, char * username )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"DELETE");
|
"DELETE");
|
||||||
|
|
||||||
if (apiClient->response_code == 400) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","Invalid username supplied");
|
//if (apiClient->response_code == 400) {
|
||||||
}
|
// printf("%s\n","Invalid username supplied");
|
||||||
if (apiClient->response_code == 404) {
|
//}
|
||||||
printf("%s\n","User not found");
|
// uncomment below to debug the error response
|
||||||
}
|
//if (apiClient->response_code == 404) {
|
||||||
|
// printf("%s\n","User not found");
|
||||||
|
//}
|
||||||
//No return type
|
//No return type
|
||||||
end:
|
end:
|
||||||
if (apiClient->dataReceived) {
|
if (apiClient->dataReceived) {
|
||||||
@ -361,15 +366,18 @@ UserAPI_getUserByName(apiClient_t *apiClient, char * username )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"GET");
|
"GET");
|
||||||
|
|
||||||
if (apiClient->response_code == 200) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","successful operation");
|
//if (apiClient->response_code == 200) {
|
||||||
}
|
// printf("%s\n","successful operation");
|
||||||
if (apiClient->response_code == 400) {
|
//}
|
||||||
printf("%s\n","Invalid username supplied");
|
// uncomment below to debug the error response
|
||||||
}
|
//if (apiClient->response_code == 400) {
|
||||||
if (apiClient->response_code == 404) {
|
// printf("%s\n","Invalid username supplied");
|
||||||
printf("%s\n","User not found");
|
//}
|
||||||
}
|
// uncomment below to debug the error response
|
||||||
|
//if (apiClient->response_code == 404) {
|
||||||
|
// printf("%s\n","User not found");
|
||||||
|
//}
|
||||||
//nonprimitive not container
|
//nonprimitive not container
|
||||||
cJSON *UserAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
|
cJSON *UserAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived);
|
||||||
user_t *elementToReturn = user_parseFromJSON(UserAPIlocalVarJSON);
|
user_t *elementToReturn = user_parseFromJSON(UserAPIlocalVarJSON);
|
||||||
@ -453,12 +461,14 @@ UserAPI_loginUser(apiClient_t *apiClient, char * username , char * password )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"GET");
|
"GET");
|
||||||
|
|
||||||
if (apiClient->response_code == 200) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","successful operation");
|
//if (apiClient->response_code == 200) {
|
||||||
}
|
// printf("%s\n","successful operation");
|
||||||
if (apiClient->response_code == 400) {
|
//}
|
||||||
printf("%s\n","Invalid username/password supplied");
|
// uncomment below to debug the error response
|
||||||
}
|
//if (apiClient->response_code == 400) {
|
||||||
|
// printf("%s\n","Invalid username/password supplied");
|
||||||
|
//}
|
||||||
//primitive return type simple
|
//primitive return type simple
|
||||||
char* elementToReturn = strdup((char*)apiClient->dataReceived);
|
char* elementToReturn = strdup((char*)apiClient->dataReceived);
|
||||||
|
|
||||||
@ -533,9 +543,10 @@ UserAPI_logoutUser(apiClient_t *apiClient)
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"GET");
|
"GET");
|
||||||
|
|
||||||
if (apiClient->response_code == 0) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","successful operation");
|
//if (apiClient->response_code == 0) {
|
||||||
}
|
// printf("%s\n","successful operation");
|
||||||
|
//}
|
||||||
//No return type
|
//No return type
|
||||||
end:
|
end:
|
||||||
if (apiClient->dataReceived) {
|
if (apiClient->dataReceived) {
|
||||||
@ -602,12 +613,14 @@ UserAPI_updateUser(apiClient_t *apiClient, char * username , user_t * body )
|
|||||||
localVarBodyParameters,
|
localVarBodyParameters,
|
||||||
"PUT");
|
"PUT");
|
||||||
|
|
||||||
if (apiClient->response_code == 400) {
|
// uncomment below to debug the error response
|
||||||
printf("%s\n","Invalid user supplied");
|
//if (apiClient->response_code == 400) {
|
||||||
}
|
// printf("%s\n","Invalid user supplied");
|
||||||
if (apiClient->response_code == 404) {
|
//}
|
||||||
printf("%s\n","User not found");
|
// uncomment below to debug the error response
|
||||||
}
|
//if (apiClient->response_code == 404) {
|
||||||
|
// printf("%s\n","User not found");
|
||||||
|
//}
|
||||||
//No return type
|
//No return type
|
||||||
end:
|
end:
|
||||||
if (apiClient->dataReceived) {
|
if (apiClient->dataReceived) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user