@@ -199,11 +199,11 @@ def dynamodb_example_deep_transform(subsegment, keys)
199199 api ( 'S3Control' ) do |api |
200200 # handled by endpoints 2.0
201201 api [ 'operations' ] . each do |_key , operation |
202- # removes accountId host prefix trait and requiredness
203- # defensive - checks host prefix labels and removes only those from API
202+ # Removes the accountId host prefix trait and requiredness.
203+ # Checks the hostPrefix labels and removes only those from the API.
204204 next unless operation [ 'endpoint' ] &&
205- ( host_prefix = operation [ 'endpoint' ] [ 'hostPrefix' ] )
206- host_prefix ! = '{AccountId}.'
205+ ( host_prefix = operation [ 'endpoint' ] [ 'hostPrefix' ] ) &&
206+ host_prefix = = '{AccountId}.'
207207
208208 operation [ 'endpoint' ] . delete ( 'hostPrefix' )
209209
@@ -216,6 +216,22 @@ def dynamodb_example_deep_transform(subsegment, keys)
216216 end
217217 end
218218
219+ # SimpleDB does not adhere to the query protocol guidelines because it
220+ # uses both flattened and locationName. Query protocol is supposed to
221+ # ignore location name (xmlName) when flattened (xmlFlattened) is used.
222+ api ( 'SimpleDB' ) do |api |
223+ api [ 'shapes' ] . each do |_ , shape |
224+ next unless shape [ 'type' ] == 'structure'
225+
226+ shape [ 'members' ] . each do |_ , member |
227+ member_ref = api [ 'shapes' ] [ member [ 'shape' ] ]
228+ next unless member_ref [ 'flattened' ]
229+
230+ member [ 'locationName' ] = member_ref [ 'member' ] [ 'locationName' ]
231+ end
232+ end
233+ end
234+
219235 smoke ( 'SMS' ) do |smoke |
220236 smoke [ 'testCases' ] = [ ]
221237 end
0 commit comments