ts-protoc-gen icon indicating copy to clipboard operation
ts-protoc-gen copied to clipboard

Property names are translated incorrectly

Open tonyneel923 opened this issue 4 years ago • 2 comments

Versions of relevant software used [email protected]

What happened Any properties defined with an underscore are translated into typescript definitions with no underscore. Also any types that are arrays have the word List appended to the name.

What you expected to happen I expect the property names to stay the same

How to reproduce it (as minimally and precisely as possible): Any proto with underscores will work for ex:

message SubscriptionDaysPastDueCalculation {
    uint32 subscription_id = 1;
    uint32 days_past_due = 2;
}

tonyneel923 avatar Nov 19 '20 16:11 tonyneel923

This problem is not about this plugin. in fact, it is caused by the official protoc compiler itself because it generates fields as getter setter methods so this plugin has to match that scheme.

You can solve this issue by using another plugin that solves this problem.

See: https://github.com/thesayyn/protoc-gen-ts and https://github.com/thesayyn/protoc-gen-ts/issues/39

thesayyn avatar Apr 19 '21 12:04 thesayyn

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 17 '22 07:04 stale[bot]