Comments in .proto file?

3,213 views
Skip to first unread message

John

unread,
Jul 9, 2008, 12:46:59 PM7/9/08
to Protocol Buffers
Perhaps I haven't looked hard enough, but I haven't found in the
documentation where comments are used in the .proto file. I can
imagine the purpose for some fields may not be obvious and the field
names might not offer enough context to clear any ambiguity. Seems
like it would be slick to attach comments to messages and fields that
made their way into the generated code, a la javadoc as an example.

Kenton Varda

unread,
Jul 9, 2008, 12:59:38 PM7/9/08
to John, Protocol Buffers

C and C++-style comments can be used in .proto files.  I guess that should be clarified in the docs.

Currently the comments are just discarded.  I agree that it would be cool to retain them and generate documentation.
Reply all
Reply to author
Forward
0 new messages