-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: grpc-transcode request support object array #7231
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the CI pass, thanks!
@@ -147,6 +147,22 @@ function _M.map_message(field, default_values, request_table) | |||
if ty ~= "enum" and field_type:sub(1, 1) == "." then | |||
if request_table[name] == nil then | |||
sub = default_values and default_values[name] | |||
elseif core.table.isarray(request_table[name]) then | |||
local sub_array = core.table.new(#request_table[name],0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local sub_array = core.table.new(#request_table[name],0) | |
local sub_array = core.table.new(#request_table[name], 0) |
@@ -147,6 +147,22 @@ function _M.map_message(field, default_values, request_table) | |||
if ty ~= "enum" and field_type:sub(1, 1) == "." then | |||
if request_table[name] == nil then | |||
sub = default_values and default_values[name] | |||
elseif core.table.isarray(request_table[name]) then | |||
local sub_array = core.table.new(#request_table[name],0) | |||
for i,value in ipairs(request_table[name]) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for i,value in ipairs(request_table[name]) do | |
for i, value in ipairs(request_table[name]) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have modified and submitted,but the CI not pass
Let's make the lint pass with reindex: https://github.com/apache/apisix/runs/6855357196?check_suite_focus=true |
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
Co-authored-by: jon.yu <jon.yu@ambergroup.io>
Co-authored-by: jon.yu <jon.yu@ambergroup.io>
Co-authored-by: jon.yu <jon.yu@ambergroup.io>
Co-authored-by: jon.yu <jon.yu@ambergroup.io>
Description
grpc-trancode if request have object array,upstream accept is empty
Fixes #5591
Checklist