Skip to content

Commit

Permalink
Empty templates for annotation of enum and members
Browse files Browse the repository at this point in the history
  • Loading branch information
martindamgaardlorensen committed Apr 19, 2024
1 parent 083501d commit 4cd252c
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 4cd252c

Please sign in to comment.