-
Notifications
You must be signed in to change notification settings - Fork 30
fix: always serialize defaults #1302
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
base: main
Are you sure you want to change the base?
Conversation
Affected ArtifactsNo artifacts changed size |
@@ -173,7 +173,7 @@ fun Model.defaultSettings( | |||
sdkId: String = TestModelDefault.SDK_ID, | |||
generateDefaultBuildFiles: Boolean = false, | |||
nullabilityCheckMode: CheckMode = CheckMode.CLIENT_CAREFUL, | |||
defaultValueSerializationMode: DefaultValueSerializationMode = DefaultValueSerializationMode.WHEN_DIFFERENT, | |||
defaultValueSerializationMode: DefaultValueSerializationMode = DefaultValueSerializationMode.DEFAULT, |
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.
This was originally set to WHEN_DIFFERENT
because serializing defaults caused problems with S3, can we double-check those model issues are now resolved?
requireNotNull(entries.find { it.value.equals(value, ignoreCase = true) }) { | ||
"$value is not a valid DefaultValueSerializationMode, expected one of ${values().map { it.value }}" |
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 did this comparison need to change?
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.
All of these tests were updated to use the previous value WHEN_DIFFERENT
. Do we have tests for the new value ALWAYS
?
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.
+1
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.
+1
Issue #
Resolves awslabs/aws-sdk-kotlin#1608
Description of changes
This change switches the default serialization mode from
WHEN_DIFFERENT
(meaning only if the value has been changed from the default) toALWAYS
(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.