Skip to content

Conversation

@ianbotsf
Copy link
Contributor

@ianbotsf ianbotsf commented Jul 7, 2025

Issue #

Resolves aws/aws-sdk-kotlin#1608

Description of changes

This change is identical to #1302 but has been rebased onto v1.5-main since it is a behavioral breaking change.

This change switches the default serialization mode from WHEN_DIFFERENT (meaning only if the value has been changed from the default) to ALWAYS (meaning...well, always). This is the current recommendation from Smithy and will offer more deterministic communication with services.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ianbotsf ianbotsf requested a review from a team as a code owner July 7, 2025 17:17
@lauzadis lauzadis changed the base branch from main to v1.5-main July 7, 2025 17:55
Comment on lines +56 to +57
val settings = defaultModel.defaultSettings(defaultValueSerializationMode = DefaultValueSerializationMode.WHEN_DIFFERENT)
val contents = getTestContents(defaultModel, "com.test#PrimitiveShapesOperation", HttpBinding.Location.HEADER, settings)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think we should have tests for the new behavior

#1302 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already had/have tests which explicitly set ALWAYS. My changes in this PR make all of the implicit WHEN_DIFFERENT values into explicit ones. Are there specific tests you'd like to see added/expanded?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, I totally missed the names of the tests here. These are perfectly fine

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@ianbotsf ianbotsf merged commit a11c511 into v1.5-main Jul 8, 2025
28 of 30 checks passed
@ianbotsf ianbotsf deleted the fix-serialize-defaults-2 branch July 8, 2025 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloudfront update behavior issue

2 participants