diff --git a/src/main/resources/handlebars/csharp/modelEnum.mustache b/src/main/resources/handlebars/csharp/modelEnum.mustache index 2993849ecf..5037bbb6bc 100644 --- a/src/main/resources/handlebars/csharp/modelEnum.mustache +++ b/src/main/resources/handlebars/csharp/modelEnum.mustache @@ -14,6 +14,6 @@ /// Enum {{name}} for value: {{{value}}} /// {{#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}} diff --git a/src/main/resources/handlebars/csharp/modelInnerEnum.mustache b/src/main/resources/handlebars/csharp/modelInnerEnum.mustache index 2d8626b54e..477be16c8d 100644 --- a/src/main/resources/handlebars/csharp/modelInnerEnum.mustache +++ b/src/main/resources/handlebars/csharp/modelInnerEnum.mustache @@ -15,7 +15,7 @@ /// Enum {{name}} for value: {{{value}}} /// {{#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}}