Skip to content

Commit 4722d29

Browse files
committed
docs(protocol): clarify enum discriminator in protoLint
1 parent 6835121 commit 4722d29

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

protocol/protoLint.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ task protoLint {
130130
def definition = item.def
131131
def parentName = item.parentName
132132

133+
// In buf's JSON image, enums expose EnumDescriptorProto.value while
134+
// message descriptors do not, so we use that field as the discriminator here.
133135
if (definition.value != null) {
134136
// This is an Enum definition
135137
def fullName = parentName ? "${parentName}.${definition.name}" : definition.name

0 commit comments

Comments
 (0)