RicoSuter / NJsonSchema

JSON Schema reader, generator and validator for .NET
http://NJsonSchema.org
MIT License
1.37k stars 529 forks source link

Add support for STJ-native C# code gen #1675

Open schnerring opened 6 months ago

schnerring commented 6 months ago

I took another crack at adding the missing System.Text.Json polymorphic serialization features to NSwag's C# client generator (previous PR: https://github.com/RicoSuter/NJsonSchema/pull/1595).

As per your suggestion I added a C# client generator setting named JsonPolymorphicSerializationStyle that defaults to NSwag (old behavior). Setting it to SystemTextJson will opt into the new behavior:

I also added a corresponding (WIP) PR in the NSwag repo that might be missing a couple of things: https://github.com/RicoSuter/NSwag/pull/4782/files

brrusino commented 4 months ago

@schnerring @RicoSuter What's the latest status of this PR?

schnerring commented 1 day ago

@RicoSuter Anything else? It's good to go from my side.