Add the possibility to customize the proto enum value name
What language does this apply to? If it's a proto syntax change, is it for proto2 or proto3? I think it is for proto2 and proto3.
If it's about generated code change, what programming language? Yes, we want to customize the C# enum output. The proto enum value name should be customizable.
Describe the problem you are trying to solve. This is not a real problem, as we are all programmers, we want to have the possibility to customize the code output of generators and we want to make the code more readable for us.
Describe the solution you'd like I would introduce a new option that overrides the default enum value name. The custom enum value name should be can defined per language separately.
Example
enum Example {
EXAMPLE_NOT_SET = 0;
EXAMPLE_TOPCONTROL_MHP1XXX_OPERATION_MODE_LEVELING = 1;
EXAMPLE_TOPCONTROL_MHP50XX_OPERATION_MODE_PASS = 2;
}
Current output
public enum Example
{
[pbr::OriginalName("EXAMPLE_TOPCONTROL_MHP1XXX_OPERATION_MODE_LEVELING")] TopcontrolMhp1XxxOperationModeLeveling = 1,
[pbr::OriginalName("EXAMPLE_TOPCONTROL_MHP50XX_OPERATION_MODE_PASS")] TopcontrolMhp50XxOperationModePass = 2,
}
Preferred output
public enum Example
{
[pbr::OriginalName("EXAMPLE_TOPCONTROL_MHP1XXX_OPERATION_MODE_LEVELING")] TopControlMHP1XXXOperationModeLeveling = 1,
[pbr::OriginalName("EXAMPLE_TOPCONTROL_MHP50XX_OPERATION_MODE_PASS")] TopControlMHP50XXOperationModePass = 2,
}
Differences:
- Topcontrol -> TopControl: This is our company name and we want to have the company name right everywhere.
- MHP1Xxx -> MHP1XXX: This is a device we produce and we want to have the device name right everywhere.
Thank you for this great library.
Sorry but I think this is language related issues. I think not all languages will have the same problems.
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.
This issue is labeled inactive because the last activity was over 90 days ago.
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.
This issue was closed and archived because there has been no new activity in the 14 days since the inactive label was added.