Skip to content
Permalink
Browse files

remove JsonInheritanceAttribute in abstract class (#1081)

(cherry picked from commit ae7e1a9)
  • Loading branch information
Goxiaoy authored and RicoSuter committed Nov 22, 2019
1 parent 493ba06 commit 8df1da668edd41d98b41b110b971178dcb5d639b
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 }}")]
{% 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 8df1da6

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