mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-11 15:54:16 +00:00
Qt5 parameterized server (#8183)
* first Commit parameterzied Server support * fixed serverconfig classes * Defautl constructor f. Config, fixed regex replace * Polosihed Templates, Added MultiServer support * Update Readme. Fixed MultiServer. Fixed def. Value * Passing global Server to mustache. Small fixes * Updated samples, fixed mustache for multi server * added prefixes, removed unused imports * added newly generated samples * missing vendorExtension in mustache. Update smaple * update doc Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
@@ -82,7 +82,7 @@ static bool addPetProcessor(MemoryStruct_s p_chunk, long code, char* errormsg, v
|
||||
}
|
||||
|
||||
static bool addPetHelper(char * accessToken,
|
||||
Pet pet,
|
||||
Pet body,
|
||||
|
||||
void(* handler)(Error, void* ) , void* userData, bool isAsync)
|
||||
{
|
||||
@@ -105,10 +105,10 @@ static bool addPetHelper(char * accessToken,
|
||||
JsonArray* json_array;
|
||||
|
||||
if (isprimitive("Pet")) {
|
||||
node = converttoJson(&pet, "Pet", "");
|
||||
node = converttoJson(&body, "Pet", "");
|
||||
}
|
||||
|
||||
char *jsonStr = pet.toJson();
|
||||
char *jsonStr = body.toJson();
|
||||
node = json_from_string(jsonStr, NULL);
|
||||
g_free(static_cast<gpointer>(jsonStr));
|
||||
|
||||
@@ -167,22 +167,22 @@ static bool addPetHelper(char * accessToken,
|
||||
|
||||
|
||||
bool PetManager::addPetAsync(char * accessToken,
|
||||
Pet pet,
|
||||
Pet body,
|
||||
|
||||
void(* handler)(Error, void* ) , void* userData)
|
||||
{
|
||||
return addPetHelper(accessToken,
|
||||
pet,
|
||||
body,
|
||||
handler, userData, true);
|
||||
}
|
||||
|
||||
bool PetManager::addPetSync(char * accessToken,
|
||||
Pet pet,
|
||||
Pet body,
|
||||
|
||||
void(* handler)(Error, void* ) , void* userData)
|
||||
{
|
||||
return addPetHelper(accessToken,
|
||||
pet,
|
||||
body,
|
||||
handler, userData, false);
|
||||
}
|
||||
|
||||
@@ -796,7 +796,7 @@ static bool updatePetProcessor(MemoryStruct_s p_chunk, long code, char* errormsg
|
||||
}
|
||||
|
||||
static bool updatePetHelper(char * accessToken,
|
||||
Pet pet,
|
||||
Pet body,
|
||||
|
||||
void(* handler)(Error, void* ) , void* userData, bool isAsync)
|
||||
{
|
||||
@@ -819,10 +819,10 @@ static bool updatePetHelper(char * accessToken,
|
||||
JsonArray* json_array;
|
||||
|
||||
if (isprimitive("Pet")) {
|
||||
node = converttoJson(&pet, "Pet", "");
|
||||
node = converttoJson(&body, "Pet", "");
|
||||
}
|
||||
|
||||
char *jsonStr = pet.toJson();
|
||||
char *jsonStr = body.toJson();
|
||||
node = json_from_string(jsonStr, NULL);
|
||||
g_free(static_cast<gpointer>(jsonStr));
|
||||
|
||||
@@ -881,22 +881,22 @@ static bool updatePetHelper(char * accessToken,
|
||||
|
||||
|
||||
bool PetManager::updatePetAsync(char * accessToken,
|
||||
Pet pet,
|
||||
Pet body,
|
||||
|
||||
void(* handler)(Error, void* ) , void* userData)
|
||||
{
|
||||
return updatePetHelper(accessToken,
|
||||
pet,
|
||||
body,
|
||||
handler, userData, true);
|
||||
}
|
||||
|
||||
bool PetManager::updatePetSync(char * accessToken,
|
||||
Pet pet,
|
||||
Pet body,
|
||||
|
||||
void(* handler)(Error, void* ) , void* userData)
|
||||
{
|
||||
return updatePetHelper(accessToken,
|
||||
pet,
|
||||
body,
|
||||
handler, userData, false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user