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:
basyskom-dege
2020-12-19 04:34:12 +01:00
committed by GitHub
parent 0be3fe6104
commit febd65d3b8
34 changed files with 1002 additions and 233 deletions

View File

@@ -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);
}