Skip to content

Commit b4288ba

Browse files
authored
fix: type naming conflict (#21)
1 parent 766a843 commit b4288ba

File tree

1 file changed

+2
-1
lines changed
  • tools/EVA.SDK.Generator.V2/Commands/Generate/Outputs/swift

1 file changed

+2
-1
lines changed

tools/EVA.SDK.Generator.V2/Commands/Generate/Outputs/swift/SwiftOutput.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,8 @@ private static void WriteDecodeInit(TypeSpecification type, IndentedStringBuilde
484484

485485
// Check if we have a conflicting property defined that will "claim" our typename
486486
// This is usually the case for props name Date or Data
487-
var typePrefix = (type.Properties.ContainsKey(typeNameNotNullable) && !containsProductDetails) ? "Foundation." : string.Empty;
487+
string[] foundationTypes = ["Data", "Date"];
488+
var typePrefix = (type.Properties.ContainsKey(typeNameNotNullable) && !containsProductDetails || foundationTypes.Contains(typeNameNotNullable)) ? "Foundation." : string.Empty;
488489

489490
if (isOptional)
490491
{

0 commit comments

Comments
 (0)