diff --git a/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION b/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION index c30f0ec2be7..d509cc92aa8 100644 --- a/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0-SNAPSHOT \ No newline at end of file +5.1.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-ue4/Public/OpenAPIHelpers.h b/samples/client/petstore/cpp-ue4/Public/OpenAPIHelpers.h index e4f58b19c66..cd804d34245 100644 --- a/samples/client/petstore/cpp-ue4/Public/OpenAPIHelpers.h +++ b/samples/client/petstore/cpp-ue4/Public/OpenAPIHelpers.h @@ -114,6 +114,11 @@ inline FStringFormatArg ToStringFormatArg(const FDateTime& Value) return FStringFormatArg(Value.ToIso8601()); } +inline FStringFormatArg ToStringFormatArg(const FGuid& Value) +{ + return FStringFormatArg(Value.ToString(EGuidFormats::DigitsWithHyphens)); +} + inline FStringFormatArg ToStringFormatArg(const TArray& Value) { return FStringFormatArg(Base64UrlEncode(Value)); @@ -229,6 +234,11 @@ inline void WriteJsonValue(JsonWriter& Writer, const FDateTime& Value) Writer->WriteValue(Value.ToIso8601()); } +inline void WriteJsonValue(JsonWriter& Writer, const FGuid& Value) +{ + Writer->WriteValue(Value.ToString(EGuidFormats::DigitsWithHyphens)); +} + inline void WriteJsonValue(JsonWriter& Writer, const Model& Value) { Value.WriteJson(Writer); @@ -290,6 +300,17 @@ inline bool TryGetJsonValue(const TSharedPtr& JsonValue, FDateTime& return false; } +inline bool TryGetJsonValue(const TSharedPtr& JsonValue, FGuid& Value) +{ + FString TmpValue; + if (JsonValue->TryGetString(TmpValue)) + { + return FGuid::Parse(TmpValue, Value); + } + else + return false; +} + inline bool TryGetJsonValue(const TSharedPtr& JsonValue, bool& Value) { bool TmpValue;