diff --git a/README.md b/README.md index 7fcde09..841a984 100644 --- a/README.md +++ b/README.md @@ -222,6 +222,10 @@ $ pipenv run tests - [x] Refs to nested types - [x] Imports in proto files - [x] Well-known Google types +- [ ] OneOf support + - [x] Basic support on the wire + - [ ] Check which was set from the group + - [ ] Setting one unsets the others - [ ] JSON that isn't completely naive. - [x] 64-bit ints as strings - [x] Maps diff --git a/betterproto/tests/oneof-name.json b/betterproto/tests/oneof-name.json new file mode 100644 index 0000000..bde99de --- /dev/null +++ b/betterproto/tests/oneof-name.json @@ -0,0 +1,3 @@ +{ + "name": "foo" +} diff --git a/betterproto/tests/oneof.json b/betterproto/tests/oneof.json new file mode 100644 index 0000000..400decb --- /dev/null +++ b/betterproto/tests/oneof.json @@ -0,0 +1,3 @@ +{ + "count": 1 +} diff --git a/betterproto/tests/oneof.proto b/betterproto/tests/oneof.proto new file mode 100644 index 0000000..693e5b5 --- /dev/null +++ b/betterproto/tests/oneof.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +message Test { + oneof foo { + int32 count = 1; + string name = 2; + } +}