Hi,

I wanted to understand what options/configs do we have while using Google 
Proto Js compiler for styling enums. I am facing a problem that all my enum 
value names get converted to uppercase after running through the compiler.

Right now our proto definition for a particular case looks like this




*option java_package = "com.packageName.proto.device";option 
java_outer_classname = "PlatformEntity";/* Supported Platforms */enum 
Platform { iOS = 1; Android = 2; Web = 3; Backend =4; }*

-----------------------------------------------------------------------

The compiled js code looks something like this
*var jspb = require('google-protobuf');*
*var goog = jspb;*
*var global = Function('return this')();*
*goog.exportSymbol('proto.Platform', null, global);*

*/** * @enum {number} */*
*proto.Platform = { IOS: 1, ANDROID: 2, WEB: 3, BACKEND: 4 }; 
goog.object.extend(exports, proto); *

As I understand, the style guide suggests 
<https://developers.google.com/protocol-buffers/docs/style#enums> enum 
value names to be defined with CAPITALS, but we don't want to do that as it 
will corrupt our existing data and/or reports.

Would appreciate if someone could point out a way to enforce the existing 
styling here during compilation.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/9bdfa1a5-26bd-4294-9a87-2c2d3bbacc11n%40googlegroups.com.

Reply via email to