-
Notifications
You must be signed in to change notification settings - Fork 80
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
chore: Update to Smithy 1.49.0 #1515
Conversation
@@ -28,7 +28,7 @@ class AWSDeprecatedShapeRemover : SwiftIntegration { | |||
Predicate<Shape> { | |||
val since = it.getTrait<DeprecatedTrait>()?.since?.orElse(null) ?: return@Predicate false | |||
val deprecatedDate = since.toLocalDate() ?: return@Predicate false.also { | |||
println("Failed to parse `since` field $since as a date, skipping removal of deprecated shape $it") | |||
println("Could not parse `since` field \"$since\" as a date, skipping removal of deprecated shape $it") |
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.
Changed this language because use of the word "failed" makes it difficult to search logs for test failures.
@@ -27,6 +27,7 @@ class EC2QueryProtocolGenerator : AWSHTTPBindingProtocolGenerator(EC2QueryCustom | |||
override val testsToIgnore = setOf( | |||
"SDKAppliedContentEncoding_ec2Query", | |||
"SDKAppendsGzipAndIgnoresHttpProvidedEncoding_ec2Query", | |||
"Ec2EmptyQueryLists", |
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.
Will fix this test in a separate ticket.
#1514
@@ -25,7 +25,7 @@ class OperationEndpointResolverMiddlewareTests { | |||
guard let region = config.region else { | |||
throw SdkError<GetThingOutputError>.client(ClientError.unknownError(("Missing required parameter: region"))) | |||
} | |||
let endpointParams = EndpointParams(boolBar: true, boolBaz: input.fuzz, boolFoo: config.boolFoo, endpoint: config.endpoint, region: region, stringBar: "some value", stringBaz: input.buzz, stringFoo: config.stringFoo) | |||
let endpointParams = EndpointParams(boolBar: true, boolBaz: input.fuzz, boolFoo: config.boolFoo, endpoint: config.endpoint, region: region, stringArrayBar: ["five", "six", "seven"], stringBar: "some value", stringBaz: input.buzz, stringFoo: config.stringFoo) |
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.
Added a test that code-generates a static param typed to stringArray.
staticContextParam.value.toString() | ||
} | ||
} | ||
swiftParam(param.type, staticContextParam.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.
Refactored this logic to a private method just below.
@@ -61,6 +61,6 @@ fun ParameterType.toShapeType(): ShapeType? { | |||
return when (this) { | |||
ParameterType.STRING -> ShapeType.STRING | |||
ParameterType.BOOLEAN -> ShapeType.BOOLEAN | |||
else -> null | |||
ParameterType.STRING_ARRAY -> ShapeType.LIST |
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.
Added STRING_ARRAY
case and eliminated the else
so this fails to compile when the next new ParameterType
case is added.
Issue #
#1513
Description of changes
Updates Smithy from 1.47.0 to 1.49.0.
Corresponding smithy-swift PR: smithy-lang/smithy-swift#733
Specific changes:
stringArray
type for endpoint params.StaticContextParam
endpoint param binding that is typedstringArray
.Two items related to this upgrade have been split into separate issues:
EC2EmptyQueryLists
protocol test)OperationalContextParams
endpoint param binding)New/existing dependencies impact assessment, if applicable
No new dependencies were added to this change.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.