Change enum serialization to lowercase#200
Change enum serialization to lowercase#200randomlogin wants to merge 1 commit intolightningdevkit:mainfrom
Conversation
|
👋 Thanks for assigning @benthecarman as a reviewer! |
benthecarman
left a comment
There was a problem hiding this comment.
tbh I don't really love this, seeing status: SUCCEEDED feels more like an enum whereas status: succeeded feels like someone hard coded a string to me
Can it be so because you know the internals and the fact that there is an enum? |
Changed the serialization macros to lowercase enum names.
Strings like "COOPERATIVE_CLOSURE", "SUCCEEDED", or "SIGNET" look unnatural in CLI output and human-facing JSON, even though SCREAMING_SNAKE_CASE is the proto3 default.
This relies on enum variants following the proto style guide (UPPER_SNAKE_CASE); a future variant using acronyms or mixed case (e.g. HTTPSEndpoint) would lowercase awkwardly. All current variants are clean.
Note: this is a breaking change for any existing JSON consumer of PaymentDirection, PaymentStatus, or BalanceSource.