You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
official protobuf Language Guide recommends using C/C++ style for comments, meaning either // or /* ... */.
Example:
/* SearchRequest represents a search query, with pagination options to * indicate which results to include in the response. */messageSearchRequest {
requiredstringquery=1;
optionalint32page_number=2; // Which page number do we want?optionalint32result_per_page=3; // Number of results to return per page.
}
@dcodeIO Any comment on that? Your idea from #640 doesn't work well here (basically it is impossible to write comments that will work correctly with protobuf.js and protoc at the same time)... Maybe a switch between to modes would be a good approach?
protobuf.js version: 6.8.8
official protobuf Language Guide recommends using C/C++ style for comments, meaning either
//
or/* ... */
.Example:
https://developers.google.com/protocol-buffers/docs/proto3 (see Adding Comments)
However, protobuf.js is now only support triple slash comments
///
.If I use the recommended style, the parsed AST is left with
comment: null
in case other styles are used.This makes it very hard to use this great library for code or documentation generation for protos that the developer does not own.
The text was updated successfully, but these errors were encountered: