Skip to content

Commit

Permalink
Fix compression trait name (#2982)
Browse files Browse the repository at this point in the history
  • Loading branch information
jterapin authored Feb 6, 2024
1 parent 0845582 commit 934cb8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ def operations
end
end

if operation.key?('requestCompression')
o.request_compression = operation['requestCompression'].each_with_object([]) do | (k,v) , arr|
if operation.key?('requestcompression')
o.request_compression = operation['requestcompression'].each_with_object([]) do |(k, v), arr|
arr << { key: k.inspect, value: v.inspect }
end
end
Expand Down
10 changes: 5 additions & 5 deletions gems/aws-sdk-core/spec/aws/plugins/request_compression_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@ module Plugins
'SomeOperation' => {
'http' => { 'method' => 'POST', 'requestUri' => '/' },
'input' => { 'shape' => 'SomeOperationRequest' },
'requestCompression' => {
'requestcompression' => {
'encodings' => ['gzip']
}
},
'OperationWithNoSupportedEncoding' => {
'http' => { 'method' => 'POST', 'requestUri' => '/' },
'input' => { 'shape' => 'SomeOperationRequest' },
'requestCompression' => {
'requestcompression' => {
'encodings' => ['custom']
}
},
'OperationWithSomeSupportedEncodings' => {
'http' => { 'method' => 'POST', 'requestUri' => '/' },
'input' => { 'shape' => 'SomeOperationRequest' },
'requestCompression' => {
'requestcompression' => {
'encodings' => %w[custom gzip]
}
},
'OperationStreaming' => {
'http' => { 'method' => 'POST', 'requestUri' => '/' },
'input' => { 'shape' => 'OperationStreamingRequest' },
'requestCompression' => {
'requestcompression' => {
'encodings' => ['gzip']
}
}
Expand Down Expand Up @@ -120,7 +120,7 @@ def expect_uncompressed_body(resp, body)
end
end

context 'requestCompression operation' do
context 'requestcompression operation' do
it 'compresses the body and sets the content-encoding header' do
resp = client.some_operation(body: uncompressed_body)
expect(resp.context.http_request.headers['Content-Encoding']).to eq('gzip')
Expand Down

0 comments on commit 934cb8f

Please sign in to comment.