mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-08 22:06:10 +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:
@@ -65,7 +65,11 @@ void OpenAPIPetApi::HandleResponse(FHttpResponsePtr HttpResponse, bool bSucceede
|
||||
FString ContentType = HttpResponse->GetContentType();
|
||||
FString Content;
|
||||
|
||||
if (ContentType == TEXT("application/json"))
|
||||
if (ContentType.IsEmpty())
|
||||
{
|
||||
return; // Nothing to parse
|
||||
}
|
||||
else if (ContentType.StartsWith(TEXT("application/json")) || ContentType.StartsWith("text/json"))
|
||||
{
|
||||
Content = HttpResponse->GetContentAsString();
|
||||
|
||||
@@ -78,7 +82,7 @@ void OpenAPIPetApi::HandleResponse(FHttpResponsePtr HttpResponse, bool bSucceede
|
||||
return; // Successfully parsed
|
||||
}
|
||||
}
|
||||
else if(ContentType == TEXT("text/plain"))
|
||||
else if(ContentType.StartsWith(TEXT("text/plain")))
|
||||
{
|
||||
Content = HttpResponse->GetContentAsString();
|
||||
InOutResponse.SetResponseString(Content);
|
||||
|
||||
Reference in New Issue
Block a user