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 and kulakowski committed Nov 7, 2023
1 parent 348a408 commit 21042f2
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

0 comments on commit 21042f2

Please sign in to comment.