Skip to content

Commit

Permalink
Merge pull request #558 from swagger-api/ticket-539
Browse files Browse the repository at this point in the history
refs #539 - fix enum index in csharp
  • Loading branch information
frantuma authored Dec 12, 2019
2 parents f3b0477 + 3a3f0c7 commit 64e1025
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/resources/handlebars/csharp/modelEnum.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
/// Enum {{name}} for value: {{{value}}}
/// </summary>
{{#isString}}[EnumMember(Value = "{{{value}}}")]{{/isString}}
{{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{@index}}{{/isString}}{{^@last}},
{{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{@index_1}}{{/isString}}{{^@last}},
{{/@last}}{{/enumVars}}{{/allowableValues}}
}{{! NOTE: This model's enumVars is modified to look like CodegenProperty}}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/// Enum {{name}} for value: {{{value}}}
/// </summary>
{{#isString}}[EnumMember(Value = "{{{value}}}")]{{/isString}}
{{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{@index}}{{/isString}}{{^@last}},
{{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{@index_1}}{{/isString}}{{^@last}},
{{/@last}}{{/enumVars}}{{/allowableValues}}
}
{{/isContainer}}

0 comments on commit 64e1025

Please # to comment.