Update XML serialization for unions to properly handle unit struct members (#4306)
## 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 --> Fixing two CI issues that recently popped up. See https://github.com/smithy-lang/smithy-rs/actions/runs/17771171675/job/50511115119#step:4:1340 for a CI run that exhibited both failures. ### Codegen Bug Fixes a bug in `XmlBindingTraitSerializerGenerator.kt` exposed by a change to the [S3-Control model ](https://github.com/awslabs/aws-sdk-rust/commit/effdaf98b3eb49e8900838176c18f72db48644ff#diff-101f9ff3d2e67a2122db6bc609ccf4baffc6aee548757139badd8d1c41ab11ab). The model change introduced a smithy union type that contained a unit struct as a member. This generated a match arm like: ``` crate::types::ObjectEncryptionFilter::Sses3(_inner) => { scope_writer.start_el("SSE-S3").finish(); } ``` `inner` is never used since there is nothing to serialize for a unit struct, so this caused a [warning and CI failure](https://github.com/smithy-lang/smithy-rs/actions/runs/17771171675/job/50511115119#step:4:1340). The change here fixes that warning by prefixing `_inner` in these cases. Some other serializer generators also appear to have this bug. Created https://github.com/smithy-lang/smithy-rs/issues/4308 to track. ### Incompatible lambda-http Version Bug To unblock CI, this PR also bumps `lambda_http` to 0.8.4 in `aws-smithy-http-server`. ## 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. --> Failed CI tasks are now passing ---- _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:ysaito1001 <awsaito@amazon.com>
Loading
Please sign in to comment