forked from loafle/openapi-generator-original
UE4 client generator fixes (#6438)
* Added the possibility for a codegen to set the location of the generated model files, similarly to API files. * Removed std::shared_ptr from the generated types. Types in UE4Codegen are handled as POD structs, not shared pointers. * Fixed handling of body parameters as per the specification, the single body object is written directly as the payload. * Fixed handling of files and binaries, if a field is both isFile and isBinary, file will take precedence. * Updated cpp-ue4 client samples * Fixed handling of enums in models Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
@@ -197,9 +197,7 @@ void OpenAPIStoreApi::PlaceOrderRequest::SetupHttpRequest(const TSharedRef<IHttp
|
||||
FString JsonBody;
|
||||
JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
|
||||
|
||||
Writer->WriteObjectStart();
|
||||
Writer->WriteIdentifierPrefix(TEXT("body")); WriteJsonValue(Writer, Body);
|
||||
Writer->WriteObjectEnd();
|
||||
WriteJsonValue(Writer, Body);
|
||||
Writer->Close();
|
||||
|
||||
HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
|
||||
|
||||
Reference in New Issue
Block a user