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

Enums changed to uppercase in generated node files #4800

Closed
TLadd opened this issue Jun 20, 2018 · 1 comment
Closed

Enums changed to uppercase in generated node files #4800

TLadd opened this issue Jun 20, 2018 · 1 comment
Assignees
Labels

Comments

@TLadd
Copy link

TLadd commented Jun 20, 2018

What version of protobuf and what language are you using?
Version: v3.5.1
Language: Javascript

What operating system (Linux, Windows, ...) and version?
Mac OS X

What did you do?
Steps to reproduce the behavior:
Example repo here: https:/TLadd/example-grpc-enum.

In the proto file, the enum is specified as

enum Value {
    hello = 0;
    hi = 1;
  }

After running

grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./ --grpc_out=./ --plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` helloworld.proto

the generated output is capitalized

/**
 * @enum {number}
 */
proto.helloworld.HelloRequest.Value = {
  HELLO: 0,
  HI: 1
};

What did you expect to see
enums maintain their casing in generated files

What did you see instead?
Lowercase enums defined in proto files are capitalized in generated files when using grpc_tools_node_protoc

grpc/grpc-node#404

@TLadd
Copy link
Author

TLadd commented Aug 8, 2018

I believe this is expected behavior. I was having an issue because the plugin I was using to generate typescript definitions did not match this behavior, but a PR was merged to make it do so.

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

No branches or pull requests

3 participants