Re: Issue 148 in protobuf: RFE: Support Documentation option in proto files and javadoc in generated Java files

38 views
Skip to first unread message

prot...@googlecode.com

unread,
Nov 2, 2010, 10:57:40 PM11/2/10
to prot...@googlegroups.com

Comment #2 on issue 148 by ken...@google.com: RFE: Support Documentation
option in proto files and javadoc in generated Java files
http://code.google.com/p/protobuf/issues/detail?id=148

Issue 232 has been merged into this issue.

prot...@googlecode.com

unread,
May 26, 2011, 10:35:02 AM5/26/11
to prot...@googlegroups.com

Comment #3 on issue 148 by FlintOBr...@gmail.com: RFE: Support
Documentation option in proto files and javadoc in generated Java files
http://code.google.com/p/protobuf/issues/detail?id=148

Has anyone done any work on this? We need it. I don't know if we'll have
time to jump in and fork it ourselves.

prot...@googlecode.com

unread,
Jul 27, 2011, 3:15:35 AM7/27/11
to prot...@googlegroups.com

Comment #4 on issue 148 by einavy...@gmail.com: RFE: Support Documentation
option in proto files and javadoc in generated Java files
http://code.google.com/p/protobuf/issues/detail?id=148

is there any support of .proto javadoc?

prot...@googlecode.com

unread,
Jul 27, 2011, 12:49:33 PM7/27/11
to prot...@googlegroups.com

Comment #5 on issue 148 by liuj...@google.com: RFE: Support Documentation
option in proto files and javadoc in generated Java files
http://code.google.com/p/protobuf/issues/detail?id=148

Issue 317 has been merged into this issue.

prot...@googlecode.com

unread,
Apr 10, 2012, 8:42:22 AM4/10/12
to prot...@googlegroups.com

Comment #6 on issue 148 by richard....@gmail.com: RFE: Support
Documentation option in proto files and javadoc in generated Java files
http://code.google.com/p/protobuf/issues/detail?id=148

Without adding any documentation option in .proto files, it would still be
possible to generate javadoc indicating whether a field is optional or
required; this would be a useful enhancement.

prot...@googlecode.com

unread,
Apr 10, 2012, 9:35:49 AM4/10/12
to prot...@googlegroups.com

Comment #7 on issue 148 by sergei.s...@gmail.com: RFE: Support
Documentation option in proto files and javadoc in generated Java files
http://code.google.com/p/protobuf/issues/detail?id=148

I agree, even without a proper protodoc/javadoc solution, just copying the
associated bit of proto definition into the getter's/setter's javadoc would
be an improvement. It's already being done as a line comment, just needs to
be turned into a javadoc.

For example, currently we have in subinterfaces of MessageOrBuilder:

// required string name = 1;
boolean hasName();
String getName();

This can be converted to:

/**
* Checks if field 'name' has beed set.
*
* @see #getName()
*/
boolean hasName();

/**
* Generated property getter for field 'name'.<br/>
* Field definition:
* <pre>required string name = 1;</pre>
*
* @see #hasName()
*/
String getName();

...and in the associated Builder:

/**
* Generated property setter for field 'name'.<br/>
* Field definition:
* <pre>required string name = 1;</pre>
*
* @see #getName()
*/
public Builder setName(String value) {...}

prot...@googlecode.com

unread,
May 21, 2013, 9:09:35 AM5/21/13
to prot...@googlegroups.com

Comment #8 on issue 148 by r.vaneet...@iterend.com: RFE: Support
Documentation option in proto files and javadoc in generated Java files
http://code.google.com/p/protobuf/issues/detail?id=148

Usefull functionnality to publish a proto within a team

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

prot...@googlecode.com

unread,
May 21, 2013, 9:18:38 AM5/21/13
to prot...@googlegroups.com

Comment #9 on issue 148 by jakob.ha...@exthex.com: RFE: Support
Documentation option in proto files and javadoc in generated Java files
http://code.google.com/p/protobuf/issues/detail?id=148

I saw basic support for javadoc as suggested in #7 is already included
since proto 2.5.0

message Message {
optional string field = 1; // a string
}

is now converted to

/**
* <code>optional string field = 1;</code>
*
* <pre>
* a string
* </pre>
*/

as javadoc for at least getters and setters in the generated Message and
MessageBuilder classes

prot...@googlecode.com

unread,
May 21, 2013, 10:13:09 AM5/21/13
to prot...@googlegroups.com

Comment #10 on issue 148 by r.vaneet...@iterend.com: RFE: Support
Documentation option in proto files and javadoc in generated Java files
http://code.google.com/p/protobuf/issues/detail?id=148

Thanks for the quick response ... I will apply it right now :)

prot...@googlecode.com

unread,
Oct 21, 2013, 5:25:53 PM10/21/13
to prot...@googlegroups.com

Comment #11 on issue 148 by okorz...@gmail.com: RFE: Support Documentation
option in proto files and javadoc in generated Java files
http://code.google.com/p/protobuf/issues/detail?id=148

Just thought I would point out that protoc 2.5.0 adds message-level
comments to the message and the builder but not the shared interface.

For example:

// This is a foo.
message Foo {
}

Will generate:

/**
* Protobuf type {@code Foo}
*
* <pre>
* This is a foo.
* </pre>
*/

On both Foo and Foo.Builder but not on FooOrBuilder. I find this somewhat
unusual since the fields are documented on FooOrBuilder.

prot...@googlecode.com

unread,
Oct 6, 2014, 3:02:32 PM10/6/14
to prot...@googlegroups.com
Updates:
Status: WontFix

Comment #12 on issue 148 by xiaof...@google.com: RFE: Support Documentation
option in proto files and javadoc in generated Java files
https://code.google.com/p/protobuf/issues/detail?id=148

(No comment was entered for this change.)
Reply all
Reply to author
Forward
0 new messages