-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Multiple External Type Usage in One Message (#8)
* update example/user_add_comment.proto * make created_at and updated_at optional * avoid message definition conflicts * update sample output * revert the original name of a message * make debts order predictable * fix test
- Loading branch information
Showing
5 changed files
with
99 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,37 @@ | ||
syntax = "proto2"; | ||
|
||
message UserAddComment { | ||
required ExampleUserAddCommentUser user = 1; | ||
required string comment = 2; | ||
repeated ExampleCommonLabel labels = 3; | ||
required GoogleProtobufTimestamp timestamp = 101; | ||
|
||
message User { | ||
message ExampleUserAddCommentUser { | ||
required string first_name = 1; | ||
optional string last_name = 2; | ||
optional bytes avatar = 3; | ||
optional ExampleUserAddCommentUserLocation location = 4; | ||
optional GoogleProtobufTimestamp created_at = 5; | ||
optional GoogleProtobufTimestamp updated_at = 6; | ||
|
||
message Location { | ||
message ExampleUserAddCommentUserLocation { | ||
required double longitude = 1; | ||
required double latitude = 2; | ||
} | ||
|
||
optional Location location = 4; | ||
message GoogleProtobufTimestamp { | ||
optional int64 seconds = 1; | ||
optional int32 nanos = 2; | ||
} | ||
} | ||
|
||
required User user = 1; | ||
required string comment = 2; | ||
|
||
message Label { | ||
message ExampleCommonLabel { | ||
optional string key = 1; | ||
optional string value = 2; | ||
} | ||
|
||
repeated Label labels = 3; | ||
|
||
message Timestamp { | ||
message GoogleProtobufTimestamp { | ||
optional int64 seconds = 1; | ||
optional int32 nanos = 2; | ||
} | ||
|
||
required Timestamp timestamp = 101; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,38 @@ | ||
z� | ||
example/user_add_comment.ppsz�syntax = "proto2"; | ||
z� | ||
example/user_add_comment.ppsz�syntax = "proto2"; | ||
|
||
message UserAddComment { | ||
required ExampleUserAddCommentUser user = 1; | ||
required string comment = 2; | ||
repeated ExampleCommonLabel labels = 3; | ||
required GoogleProtobufTimestamp timestamp = 101; | ||
|
||
message User { | ||
message ExampleUserAddCommentUser { | ||
required string first_name = 1; | ||
optional string last_name = 2; | ||
optional bytes avatar = 3; | ||
optional ExampleUserAddCommentUserLocation location = 4; | ||
optional GoogleProtobufTimestamp created_at = 5; | ||
optional GoogleProtobufTimestamp updated_at = 6; | ||
|
||
message Location { | ||
message ExampleUserAddCommentUserLocation { | ||
required double longitude = 1; | ||
required double latitude = 2; | ||
} | ||
|
||
optional Location location = 4; | ||
message GoogleProtobufTimestamp { | ||
optional int64 seconds = 1; | ||
optional int32 nanos = 2; | ||
} | ||
} | ||
|
||
required User user = 1; | ||
required string comment = 2; | ||
|
||
message Label { | ||
message ExampleCommonLabel { | ||
optional string key = 1; | ||
optional string value = 2; | ||
} | ||
|
||
repeated Label labels = 3; | ||
|
||
message Timestamp { | ||
message GoogleProtobufTimestamp { | ||
optional int64 seconds = 1; | ||
optional int32 nanos = 2; | ||
} | ||
|
||
required Timestamp timestamp = 101; | ||
} |