Skip to content
Snippets Groups Projects
Select Git revision
  • 345624eb6c3f063955b0d4ebb5eef0db17a397d5
  • main default protected
  • release-2025-07-25-with-patches protected
  • release-2025-06-11-with-patches protected
  • release-2025-05-15-with-patches protected
  • release-2025-03-27-with-patches protected
  • release-2024-12-30-with-client-builder protected
  • release-2024-12-26-with-client-builder protected
  • release-2024-11-05-with-client-builder protected
  • release-2024-08-16-with-client-builder protected
  • release-2024-09-09-with-client-builder protected
  • release-2024-08-28-with-client-builder protected
  • release-2024-10-09-with-client-builder protected
  • sbuttgereit/expose_client_builder_with_hyper_1_0
  • release-2025-07-25
  • release-2025-07-23
  • release-2025-07-21
  • release-2025-07-17
  • release-2025-07-16
  • release-2025-07-08
  • release-2025-06-30
  • release-2025-06-27
  • release-2025-06-11
  • release-2025-06-03
  • release-2025-05-19
  • release-2025-05-15
  • release-2025-05-09
  • release-2025-05-02
  • release-2025-04-23
  • release-2025-03-27
  • release-2025-03-25
  • release-2025-03-10
  • release-2025-03-04
  • release-2025-02-20
34 results

smithy-rs

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Miles Ziemer authored and GitHub committed
    ## Motivation and Context
    <!--- Why is this change required? What problem does it solve? -->
    <!--- If it fixes an open issue, please link to the issue here -->
    Previously, there was logic used to ignore the default 0/false values
    for numbers/booleans when serializing members if they weren't boxed.
    This was to fix issues that occured when upstream models didn't properly
    box shapes that were meant to be optional, and for the most part worked
    because services would just fill in the default if it wasn't passed.
    However, with Smithy 2.0, models may have defaults != 0/false, but the
    codegenerator still ignores the zero value.
    
    ## Description
    <!--- Describe your changes in detail -->
    This commit makes it so that the actual default value for the member is
    ignored for booleans and numbers, instead of just 0/false. It also
    updates serialization for http bindings so that headers and query
    parameters with 0/false values aren't ignored if they are optional
    parameters.
    
    ## Testing
    <!--- Please describe in detail how you tested your changes -->
    <!--- Include details of your testing environment, and the tests you ran
    to -->
    <!--- see how your change affects other areas of the code, etc. -->
    - [x] Generated AWS SDK and inspected diff. Only changes are not
    ignoring default value inside `if let Some() = ...` blocks, and ignoring
    default value instead of just 0 (only seems to effect nimble).
    - [x] Added protocol tests for serializing 0/false in query params for
    restXml and restJson
    
    ## Checklist
    <!--- If a checkbox below is not applicable, then please DELETE it
    rather than leaving it unchecked -->
    - [x] I have updated `CHANGELOG.next.toml` if I made changes to the
    smithy-rs codegen or runtime crates
    - [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
    SDK, generated SDK code, or SDK runtime crates
    
    ----
    
    _By submitting this pull request, I confirm that you can use, modify,
    copy, and redistribute this contribution, under the terms of your
    choice._
    
    ---------
    
    Co-authored-by: default avatarJohn DiSanti <john@vinylsquid.com>
    345624eb
    History
    Name Last commit Last update