Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why append "List" to all repeated labels? #86

Closed
sangaman opened this issue Jun 5, 2018 · 2 comments
Closed

Why append "List" to all repeated labels? #86

sangaman opened this issue Jun 5, 2018 · 2 comments

Comments

@sangaman
Copy link

sangaman commented Jun 5, 2018

I've noticed that this plugin is adding "List" to the end of every label for repeated fields on a Message. The logic in the code confirms my observations. Is there a reason for this? I'm finding it to be an annoyance and source of confusion, particularly because "List" is appended even for labels that are already pluralized. In fact, a label named object_list would become ObjectListList.

It'd be nice to at least be able to disable this functionality, although maybe I am missing something and there is a good reason it's set up this way since I am relatively new to grpc and protocol buffers.

@jonnyreeves
Copy link
Contributor

Thanks for raising.

The JavaScript protoc plugin is responsible for generating JavaScript sources from proto files, ts-protoc-gen only generates the matching typescript definitions.

I personally do not believe this is something that will be changed and I would suggest you use the plural form when naming repeated fields (ie objects).

@sangaman
Copy link
Author

sangaman commented Jun 7, 2018

Right that makes sense that it would be an issue with the underlying protoc plugin. Too bad it's unlikely to be changed, but I might open an issue there anyhow. objects is much clearer than objectsList, at least in my mind. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants