extend.proto 394 B

1234567891011121314151617181920212223
  1. import "google/protobuf/descriptor.proto"; // Ignored
  2. // import "./google/protobuf/descriptor.proto"; // Not ignored
  3. extend google.protobuf.MessageOptions {
  4. optional int32 foo = 1001;
  5. }
  6. message Foo {
  7. extensions 2 to max;
  8. }
  9. extend Foo {
  10. optional string bar = 2;
  11. }
  12. message Bar {
  13. message Foo {
  14. }
  15. extend .Foo {
  16. optional Foo foo = 3; // references Bar.Foo
  17. }
  18. }