File tree Expand file tree Collapse file tree 3 files changed +178
-158
lines changed
Expand file tree Collapse file tree 3 files changed +178
-158
lines changed Original file line number Diff line number Diff line change 11+++
22title = " Feature Settings for Editions"
3- weight = 42
3+ weight = 43
44description = " Protobuf Editions features and how they affect protobuf behavior."
55type = " docs"
66+++
Original file line number Diff line number Diff line change @@ -98,11 +98,14 @@ enum FooBar {
9898```
9999
100100Each enum value should end with a semicolon, not a comma. Prefer prefixing enum
101- values instead of surrounding them in an enclosing message. The zero value enum
102- should have the suffix ` UNSPECIFIED ` , because a server or application that gets
103- an unexpected enum value will mark the field as unset in the proto instance. The
104- field accessor will then return the default value, which for enum fields is the
105- first enum value.
101+ values instead of surrounding them in an enclosing message.
102+
103+ The zero value enum should have the suffix ` UNSPECIFIED ` , because a server or
104+ application that gets an unexpected enum value will mark the field as unset in
105+ the proto instance. The field accessor will then return the default value, which
106+ for enum fields is the first enum value. For more information on the unspecified
107+ enum value, see
108+ [ the Proto Best Practices page] ( /programming-guides/dos-donts#unspecified-enum ) .
106109
107110## Services {#services}
108111
You can’t perform that action at this time.
0 commit comments