Added missing "options" parameter.

pull/8936/head
Joshua Haberman 3 years ago
parent 1f838107d8
commit 6d8b05bfd4
  1. 4
      ruby/lib/google/protobuf/descriptor_dsl.rb
  2. 5
      ruby/tests/basic_test.proto

@ -301,8 +301,8 @@ module Google
internal_add_field(:LABEL_REQUIRED, name, type, number, type_class, options)
end
def repeated(name, type, number, type_class = nil)
internal_add_field(:LABEL_REPEATED, name, type, number, type_class, nil)
def repeated(name, type, number, type_class = nil, options=nil)
internal_add_field(:LABEL_REPEATED, name, type, number, type_class, options)
end
def oneof(name, &block)

@ -208,3 +208,8 @@ message MyStruct {
string string = 1;
google.protobuf.Struct struct = 2;
}
message WithJsonName {
optional int32 foo_bar = 1 [json_name="jsonFooBar"];
repeated WithJsonName baz = 2 [json_name="jsonBaz"];
}

Loading…
Cancel
Save