Merge pull request #8936 from haberman/ruby-json-name

Added missing "options" parameter.
pull/8941/head
Joshua Haberman 4 years ago committed by GitHub
commit 1de15cef31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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