improbable-eng / ts-protoc-gen

Protocol Buffers Compiler (protoc) plugin for TypeScript and gRPC-Web.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Property names are translated incorrectly

tonyneel923 opened this issue · comments

Versions of relevant software used
ts-protoc-gen@0.12.0

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;
}

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 thesayyn/protoc-gen-ts#39

commented

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.