You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
api: use consistent casing for initialisms in API protos #2405
The Protobuf Style Guide requires TitleCase for message, enum, service, and RPC names, treating abbreviations and acronyms as single words (GetDnsRequest rather than GetDNSRequest).
Because protoc-gen-go always converts lower_snake_case field names to TitleCase (Http, Https, TlsPassthrough, HttpGet, ActorJwt, Uid, Uri) while copying message and RPC names verbatim, using all-caps acronyms in .proto causes:
Casing mismatches within the same generated *pb expression in Go:
Broken word-boundary splitting in non-Go code generators (Python, TypeScript, Rust, Java, etc.) and incompatibility with protoc's enforce_naming_style in Protobuf Editions (if we ever migrate to them).
While this is not ideal because Go's rule for casing of initialisms is different (This is different than Go's rule (https://google.github.io/styleguide/go/decisions.html#initialisms), standardizing .proto definitions on Protobuf TitleCase at least gives a clean boundary. Everything in generated *pb packages uses TitleCase (Http, Https, Tls, Jwt, Uid, Uri), while handwritten Go packages continue to use standard Go initialisms (HTTP, TLS, JWT, UID).
changed the title [-]Use consistent casing for initialisms in API protos[/-][+]api: use consistent casing for initialisms in API protos[/+]on Oct 9, 2026
Activity
[-]Use consistent casing for initialisms in API protos[/-][+]api: use consistent casing for initialisms in API protos[/+]thockin commentedon Oct 12, 2026
Yeah, I dislike not being Go-style in Go, but any convention is better than none.
I notice also that, wrt field names we get THREE conventions.
Proto:
Go:
JSON:
I would hope that at least JSON would follow proto names, but it does not.
Open question: When we write API doc comments, should we xref fields and types in their proto style or Go style or JSON style? e.g.
juli4n commentedon Oct 12, 2026
My thinking was proto style (i.e.
bar_field_name). I have a TODO to add this to the style guide, which doesn't talk about documentation at all. WDYT?thockin commentedon Oct 12, 2026
SGTM
Use TitleCase for initialisms in API proto names. (agent-substrate#2520)