Skip to content

Commit c5896f6

Browse files
Protocol Buffer TeamLogofile
authored andcommitted
This change includes the following:
* Fixes a link in the News home page * Adds more guidance about message and field names * Updates the proto2 and proto3 spec pages to indicate that the `syntax` element is optional in OSS projects PiperOrigin-RevId: 613892885 Change-Id: I74fd02f808ec4e2fc48721226ca1a3d016563304
1 parent 669c69d commit c5896f6

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

content/news/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ per-release topics, as some content is not tied to a version.
1616
The following news topics provide information in the reverse order in which it
1717
was released.
1818

19-
* [February 27, 2024](/news/2024-02-05) - Dropping
19+
* [February 27, 2024](/news/2024-02-27) - Dropping
2020
support for older versions of Ruby
2121
* [February 5, 2024](/news/2024-02-05) - Breaking
2222
changes in Java, C++, and Python in the 26.x line.

content/programming-guides/style.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ the protocol buffer type definitions.
4343

4444
## Message and Field Names {#message-field-names}
4545

46-
Use PascalCase (with an initial capital) for message names – for example,
47-
`SongServerRequest`. Use lower_snake_case for field names (including oneof field
48-
and extension names) – for example, `song_name`.
46+
Use PascalCase (with an initial capital) for message names: `SongServerRequest`.
47+
Prefer to capitalize abbreviations as single words: `GetDnsRequest` rather than
48+
`GetDNSRequest`. Use lower_snake_case for field names, including oneof field and
49+
extension names: `song_name`.
4950

5051
```proto
5152
message SongServerRequest {

content/reference/protobuf/proto2-spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ service SearchService {
408408
## Proto file {#proto_file}
409409

410410
```
411-
proto = syntax { import | package | option | topLevelDef | emptyStatement }
411+
proto = [syntax] { import | package | option | topLevelDef | emptyStatement }
412412
topLevelDef = message | enum | extend | service
413413
```
414414

content/reference/protobuf/proto3-spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ service SearchService {
338338
## Proto File {#proto_file}
339339

340340
```
341-
proto = syntax { import | package | option | topLevelDef | emptyStatement }
341+
proto = [syntax] { import | package | option | topLevelDef | emptyStatement }
342342
topLevelDef = message | enum | service
343343
```
344344

0 commit comments

Comments
 (0)