[REQ] make Enum suffix configurable
Created by: scottdallamura
Is your feature request related to a problem? Please describe.
I'd like to configure the suffix used for generated enum values in C#. Today it generates enum values with an Enum
suffix, which my team doesn't like :)
/// <summary>
/// Gets or Sets State
/// </summary>
[TypeConverter(typeof(CustomEnumConverter<State>))]
[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public enum State
{
/// <summary>
/// Enum ActiveEnum for Active
/// </summary>
[EnumMember(Value = "Active")]
ActiveEnum = 1,
/// <summary>
/// Enum ClosedEnum for Closed
/// </summary>
[EnumMember(Value = "Closed")]
ClosedEnum = 2
}
Describe the solution you'd like
I'd like to expose a config option for the aspnetcore/CSharp generator that makes the suffix configurable (or clearable):
{
"apiPackage": "MyApi.Controllers",
"modelPackage": "MyApi.Models",
"packageName": "MyApi",
"sourceFolder": "",
"enumSuffix": ""
}
Describe alternatives you've considered
This appears possible with a custom template, but it also seems to fit with other config options such as model-name-suffix.