pull/8214/head
parent
1d39f78818
commit
48234f5f01
5 changed files with 28 additions and 25 deletions
@ -0,0 +1,19 @@ |
||||
syntax = "proto3"; |
||||
|
||||
message Function { |
||||
string name = 1; |
||||
repeated Function.Parameter parameters = 2; |
||||
string return_type = 3; |
||||
|
||||
message Parameter { |
||||
string name = 1; |
||||
Function.Parameter.Value value = 2; |
||||
|
||||
message Value { |
||||
oneof type { |
||||
string string = 1; |
||||
int64 integer = 2; |
||||
} |
||||
} |
||||
} |
||||
} |
@ -1,25 +0,0 @@ |
||||
# |
||||
# Provide tests for having messages nested 3 levels deep |
||||
# |
||||
|
||||
require 'google/protobuf' |
||||
|
||||
Google::Protobuf::DescriptorPool.generated_pool.build do |
||||
add_file("function_call.proto", :syntax => :proto3) do |
||||
add_message "Function" do |
||||
optional :name, :string, 1 |
||||
repeated :parameters, :message, 2, "Function.Parameter" |
||||
optional :return_type, :string, 3 |
||||
end |
||||
add_message "Function.Parameter" do |
||||
optional :name, :string, 1 |
||||
optional :value, :message, 2, "Function.Parameter.Value" |
||||
end |
||||
add_message "Function.Parameter.Value" do |
||||
oneof :type do |
||||
optional :string, :string, 1 |
||||
optional :integer, :int64, 2 |
||||
end |
||||
end |
||||
end |
||||
end |
Loading…
Reference in new issue