summaryrefslogtreecommitdiffstats
path: root/tests/person.proto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/person.proto')
-rw-r--r--tests/person.proto11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/person.proto b/tests/person.proto
index ec5b4cca..01b2d4e1 100644
--- a/tests/person.proto
+++ b/tests/person.proto
@@ -1,7 +1,10 @@
+import "nanopb.proto";
+
message Person {
- required string name = 1;
+ required string name = 1 [(nanopb).max_size = 40];
required int32 id = 2;
- optional string email = 3;
+ optional string email = 3 [(nanopb).max_size = 40];
+ optional bytes test = 5 [default = "abc\x00\x01\x02"];
enum PhoneType {
MOBILE = 0;
@@ -10,9 +13,9 @@ message Person {
}
message PhoneNumber {
- required string number = 1;
+ required string number = 1 [(nanopb).max_size = 40];
optional PhoneType type = 2 [default = HOME];
}
- repeated PhoneNumber phone = 4;
+ repeated PhoneNumber phone = 4 [(nanopb).max_count = 5];
}