blob: 409851aa47f71f41b4aa6807229130e8d31dbc5b [file] [log] [blame]
/**
* File with alternate comment syntax.
* This file uses double slash and regular star-slash comment styles for doc
* strings.
*/
syntax = "proto3";
// Message with
// a
// multi-line comment.
message Test1 {
/**
* Field with a doc-block comment.
*/
string field1 = 1;
// Field with a single-line comment starting with two slashes.
uint32 field2 = 2;
/// Field with a single-line comment starting with three slashes.
bool field3 = 3;
/* Field with a single-line slash-star comment. */
bool field4 = 4;
bool field5 = 5; // Field with a trailing single-line two-slash comment.
bool field6 = 6; /// Field with a trailing single-line three-slash comment.
bool field7 = 7; /* Field with a trailing single-line slash-star comment. */
bool field8 = 8;
// Field with a
// multi-line comment.
bool field9 = 9;
/**
* Field with a
* multi-line doc-block comment.
*/
string field10 = 10;
// Field with both block comment
string field11 = 11; // and trailing comment.
string field12 = 12; // Trailing comment in last line should not be recognized as leading comment for this field.
}
/* Message
with
a multiline plain slash-star
comment.
*/
message Test2 {
}
/*
* Message
* with
* a
* comment and stars.
*/
enum Test3 {
/** Value with a comment. */
ONE = 1;
// Value with a single-line comment.
TWO = 2;
/// Value with a triple-slash comment.
THREE = 3; // ignored
FOUR = 4; /// Other value with a comment.
}
service ServiceTest {
// My method does things
rpc SingleLineMethod (MyRequest) returns (MyResponse);
// TwoLineMethodWithComment documentation
rpc TwoLineMethodWithComment (MyRequest)
returns (MyResponse);
// Very very long method
rpc
ThreeLine012345678901234567890123456712345671234567123456783927483923473892837489238749832432874983274983274983274(MyRequest)
returns (MyResponse);
// Random comment
rpc TwoLineMethodNoComment (MyRequest)
returns (MyResponse);
}
message MyRequest {
string path = 1;
}
message MyResponse {
int32 status = 2;
}