Skip to content

Commit

Permalink
Use PropertyName instead of actual JSON Name for record generation
Browse files Browse the repository at this point in the history
  • Loading branch information
fzzle committed Jan 10, 2024
1 parent 3585d60 commit 98c5c5f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
{%- else %}
[Newtonsoft.Json.JsonConstructor]
{%- endif %}
{% if IsAbstract %}protected{% else %}public{% endif %} {{ClassName}}({% for property in sortedProperties %}{%- if skipComma %}{%- assign skipComma = false %}{% else %}, {% endif %}{{ property.Type }} @{{ property.Name | lowercamelcase }}{% endfor %})
{% if IsAbstract %}protected{% else %}public{% endif %} {{ClassName}}({% for property in sortedProperties %}{%- if skipComma %}{%- assign skipComma = false %}{% else %}, {% endif %}{{ property.Type }} @{{ property.PropertyName | lowercamelcase }}{% endfor %})
{%- assign skipComma = true %}
{%- if HasInheritance %}
: base({%- for property in sortedParentProperties %}{%- if skipComma %}{%- assign skipComma = false %}{% else %}, {% endif %}{{ property.Name | lowercamelcase }}{%- endfor %})
: base({%- for property in sortedParentProperties %}{%- if skipComma %}{%- assign skipComma = false %}{% else %}, {% endif %}{{ property.PropertyName | lowercamelcase }}{%- endfor %})
{%- endif %}
{
{%- for property in Properties %}
this.{{property.PropertyName}} = @{{property.Name | lowercamelcase}};
this.{{property.PropertyName}} = @{{property.PropertyName | lowercamelcase}};
{%- endfor %}
}

0 comments on commit 98c5c5f

Please sign in to comment.