Skip to content

Commit

Permalink
Empty templates for annotation of enum and members (#1693)
Browse files Browse the repository at this point in the history
  • Loading branch information
martindamgaardlorensen authored Jun 12, 2024
1 parent 3cbd586 commit bf53a8f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 2 additions & 0 deletions src/NJsonSchema.CodeGeneration.CSharp/Templates/Enum.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
{%- if IsEnumAsBitFlags -%}
[System.Flags]
{%- endif -%}
{%- template Enum.Annotations -%}
{{ TypeAccessModifier }} enum {{ Name }}{%- if HasExtendedValueRange %} : long{% endif %}
{
{%- for enum in Enums %}
{%- if IsStringEnum -%}
[System.Runtime.Serialization.EnumMember(Value = @"{{ enum.Value | replace: '"', '""' }}")]
{%- endif -%}
{%- template Enum.Member.Annotations -%}
{%- if IsEnumAsBitFlags -%}
{{ enum.Name }} = {{ enum.InternalFlagValue }},
{%- else -%}
Expand Down

0 comments on commit bf53a8f

Please sign in to comment.