Skip to content

Commit

Permalink
Do not seralize empty lists
Browse files Browse the repository at this point in the history
  • Loading branch information
jterapin committed May 2, 2024
1 parent 85761e9 commit c9e5f9b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions gems/aws-sdk-core/lib/aws-sdk-core/query/ec2_param_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ def structure(ref, values, prefix)
end

def list(ref, values, prefix)
if values.empty?
set(prefix, '')
else
member_ref = ref.shape.member
values.each.with_index do |value, n|
format(member_ref, value, "#{prefix}.#{n+1}")
end
return if values.empty?

member_ref = ref.shape.member
values.each.with_index do |value, n|
format(member_ref, value, "#{prefix}.#{n + 1}")
end
end

Expand Down

0 comments on commit c9e5f9b

Please sign in to comment.