Skip to content

Commit

Permalink
Fix SimpleDB serialization with latest aws-sdk-core (#3056)
Browse files Browse the repository at this point in the history
  • Loading branch information
mullermp committed Jul 1, 2024
1 parent 1db6f09 commit 2f73fef
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
24 changes: 20 additions & 4 deletions build_tools/customizations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ def dynamodb_example_deep_transform(subsegment, keys)
api('S3Control') do |api|
# handled by endpoints 2.0
api['operations'].each do |_key, operation|
# removes accountId host prefix trait and requiredness
# defensive - checks host prefix labels and removes only those from API
# Removes the accountId host prefix trait and requiredness.
# Checks the hostPrefix labels and removes only those from the API.
next unless operation['endpoint'] &&
(host_prefix = operation['endpoint']['hostPrefix'])
host_prefix != '{AccountId}.'
(host_prefix = operation['endpoint']['hostPrefix']) &&
host_prefix == '{AccountId}.'

operation['endpoint'].delete('hostPrefix')

Expand All @@ -216,6 +216,22 @@ def dynamodb_example_deep_transform(subsegment, keys)
end
end

# SimpleDB does not adhere to the query protocol guidelines because it
# uses both flattened and locationName. Query protocol is supposed to
# ignore location name (xmlName) when flattened (xmlFlattened) is used.
api('SimpleDB') do |api|
api['shapes'].each do |_, shape|
next unless shape['type'] == 'structure'

shape['members'].each do |_, member|
member_ref = api['shapes'][member['shape']]
next unless member_ref['flattened']

member['locationName'] = member_ref['member']['locationName']
end
end
end

smoke('SMS') do |smoke|
smoke['testCases'] = []
end
Expand Down
2 changes: 2 additions & 0 deletions gems/aws-sdk-simpledb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Unreleased Changes
------------------

* Issue - Fix query serialization with `aws-sdk-core` >= 3.192.

1.49.0 (2024-06-25)
------------------

Expand Down

0 comments on commit 2f73fef

Please sign in to comment.