Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(map): Extend supported Key Types for C# codegen #71

Merged
merged 10 commits into from
Jan 25, 2024
Prev Previous commit
Next Next commit
test(*): snapshot update
Signed-off-by: Jonathan Casey <[email protected]>
  • Loading branch information
jonathan-casey committed Nov 14, 2023
commit 77ba0f2ff775407e95cfc98eddc7554a4070343d
4 changes: 2 additions & 2 deletions test/codegen/__snapshots__/codegen.js.snap
Original file line number Diff line number Diff line change
@@ -428,7 +428,7 @@ public abstract class Person : Participant {
public string ssn { get; set; }
public float height { get; set; }
public System.DateTime dob { get; set; }
public Dictionary<string, System.DateTime> nextOfKin { get; set; }
public Dictionary<string, string> nextOfKin { get; set; }
}
[AccordProject.Concerto.Type(Namespace = "org.acme.hr", Version = null, Name = "Employee")]
[System.Text.Json.Serialization.JsonConverter(typeof(AccordProject.Concerto.ConcertoConverterFactorySystem))]
@@ -5978,7 +5978,7 @@ public abstract class Person : Participant {
public string ssn { get; set; }
public float height { get; set; }
public System.DateTime dob { get; set; }
public Dictionary<string, System.DateTime> nextOfKin { get; set; }
public Dictionary<string, string> nextOfKin { get; set; }
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These types seem to have got more general. Is this expected?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the underlying Primitive of a Scalar should be printed, in place of its alias name

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beware the logic that handles UUID. Did you test with a map that has a UUID as a key or value? It looks like the code generator doesn't unbox those.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dselman logic added to handle concerto.scalar.UUID for k & v

[AccordProject.Concerto.Type(Namespace = "org.acme.hr", Version = "1.0.0", Name = "Employee")]
[System.Text.Json.Serialization.JsonConverter(typeof(AccordProject.Concerto.ConcertoConverterFactorySystem))]
Loading