We default to underlying type for enums alwasy. Add following attributes. Can be configured as classs level or member level.
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = true)]
public class EnumAsStringProperty : System.Attribute
{
}
[AttributeUsage(AttributeTargets.Property)] // class leve is default. This used to override EnumAsStringProperty as class level
public class EnumAsUnderlyTypeProperty : System.Attribute
{
}