diff --git a/src/NJsonSchema.CodeGeneration.CSharp/Templates/JsonInheritanceConverter.liquid b/src/NJsonSchema.CodeGeneration.CSharp/Templates/JsonInheritanceConverter.liquid index d426dfe07..5a1ecac1c 100644 --- a/src/NJsonSchema.CodeGeneration.CSharp/Templates/JsonInheritanceConverter.liquid +++ b/src/NJsonSchema.CodeGeneration.CSharp/Templates/JsonInheritanceConverter.liquid @@ -100,7 +100,7 @@ public class JsonInheritanceConverter : System.Text.Json.Serialization.Js return attribute.Type; } - return objectType; + return null; } private string GetSubtypeDiscriminator(System.Type objectType)