Skip to content

Commit

Permalink
Add OptIn serialization attribute for C# generated types (#516)
Browse files Browse the repository at this point in the history
* Add OptIn serialization attribute

* Run rust fmt
  • Loading branch information
aasoni authored Nov 1, 2023
1 parent 141a725 commit cdda98b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/cli/src/subcommands/generate/csharp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,11 @@ fn autogen_csharp_product_table_common(
writeln!(output, "{{").unwrap();
{
indent_scope!(output);
writeln!(
output,
"[Newtonsoft.Json.JsonObject(Newtonsoft.Json.MemberSerialization.OptIn)]"
)
.unwrap();
writeln!(output, "public partial class {name} : IDatabaseTable").unwrap();
writeln!(output, "{{").unwrap();
{
Expand Down

1 comment on commit cdda98b

@github-actions
Copy link

@github-actions github-actions bot commented on cdda98b Nov 1, 2023

Choose a reason for hiding this comment

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

Benchmarking failed. Please check the workflow run for details.

Please sign in to comment.