Skip to content
Permalink
Browse files

remove JsonInheritanceAttribute in abstract class

  • Loading branch information
Goxiaoy committed Oct 15, 2019
1 parent 953a4d3 commit ae7e1a96c8cb7b0687c7044e567c2aa9e1202c1f
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/NJsonSchema.CodeGeneration.CSharp/Templates/Class.liquid
@@ -4,7 +4,9 @@
{% if HasDiscriminator -%}
[Newtonsoft.Json.JsonConverter(typeof(JsonInheritanceConverter), "{{ Discriminator }}", typeof({{ ClassName }}))]
{% for derivedClass in DerivedClasses -%}
{% if derivedClass.IsAbstract != true -%}
[JsonInheritanceAttribute("{{ derivedClass.Discriminator }}", typeof({{ derivedClass.ClassName }}))]
{% endif -%}
{% endfor -%}
{% endif -%}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "{{ ToolchainVersion }}")]

0 comments on commit ae7e1a9

Please sign in to comment.
You can’t perform that action at this time.