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:
Samuel Kahn
2020-05-31 18:13:12 +02:00
committed by GitHub
parent a96e783f06
commit e3eb3c2f7d
25 changed files with 84 additions and 58 deletions

View File

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