- 
                Notifications
    
You must be signed in to change notification settings  - Fork 221
 
Bump smithy version to 1.52 #3887
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
Conversation
Also update ddb model in protocol tests to match current since it was old and throwing various warnings.
2a7b98b    to
    14ae7dd      
    Compare
  
    81198f9    to
    d43e580      
    Compare
  
    f42809f    to
    423c8ba      
    Compare
  
    | 
           A new generated diff is ready to view. 
 A new doc preview is ready to view.  | 
    
46e5dd2    to
    7657f1b      
    Compare
  
    | 
           A new generated diff is ready to view. 
 A new doc preview is ready to view.  | 
    
| 
           A new generated diff is ready to view. 
 A new doc preview is ready to view.  | 
    
| 
           A new generated diff is ready to view. 
 A new doc preview is ready to view.  | 
    
        
          
                ...tlin/software/amazon/smithy/rust/codegen/core/smithy/generators/http/HttpBindingGenerator.kt
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | 
           A new generated diff is ready to view. 
 A new doc preview is ready to view.  | 
    
| 
           A new generated diff is ready to view. 
 A new doc preview is ready to view.  | 
    
| // Empty vec in header is serialized as an empty string | ||
| if ${context.valueExpression.name}.is_empty() { | ||
| builder = builder.header("$headerName", ""); | ||
| } else {""", | ||
| "}", conditional = serializeEmptyHeaders, | 
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.
Nice!
| fun renderUpdateHttpBuilder(implBlockWriter: RustWriter) { | ||
| uriBase(implBlockWriter) | ||
| val addHeadersFn = httpBindingGenerator.generateAddHeadersFn(operationShape) | ||
| val addHeadersFn = httpBindingGenerator.generateAddHeadersFn(operationShape, serializeEmptyHeaders = true) | 
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.
Why does this only affect clients?
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.
The updated tests for this only apply to clients: https://github.com/smithy-lang/smithy/pull/2403/files
There are similar tests for the server, but they still indicate that empty headers should not be serialized by the server: https://github.com/smithy-lang/smithy/blob/main/smithy-aws-protocol-tests/model/restJson1/http-headers.smithy#L455
I asked internally about this discrepancy and there didn't seem to be much of a reason for it, so it might be updated in the future to align the two.
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 made a PR to smithy to update the server tests to align: smithy-lang/smithy#2433
Motivation and Context
Bumping smithy to 1.52 for an
httpChecksumtrait bugfixA few fixes had to be made to protocol tests for this release:
{}instead of null""(Note that this change does not apply to server header serialization)accept: application/cborheader to add rpcV2Cbor requestsBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.