diff --git a/IntegrationTests/Services/AWSCognitoIdentityIntegrationTests/UnauthenticatedAPITests.swift b/IntegrationTests/Services/AWSCognitoIdentityIntegrationTests/UnauthenticatedAPITests.swift index 7022ff8eae4..5b08113d537 100644 --- a/IntegrationTests/Services/AWSCognitoIdentityIntegrationTests/UnauthenticatedAPITests.swift +++ b/IntegrationTests/Services/AWSCognitoIdentityIntegrationTests/UnauthenticatedAPITests.swift @@ -65,7 +65,9 @@ class UnauthenticatedAPITests: XCTestCase { } // Interceptor & interceptor provider for sanity-checking that request is indeed unauthenticated. -class GetHeadersBeforeTransmit: HttpInterceptor { +class GetHeadersBeforeTransmit: Interceptor { + typealias RequestType = HTTPRequest + typealias ResponseType = HTTPResponse func readBeforeTransmit(context: some AfterSerialization) async throws { // Assert that the request is unauthenticated. XCTAssertTrue(!context.getRequest().headers.exists(name: "Authorization")) diff --git a/IntegrationTests/Services/AWSS3IntegrationTests/S3FlexibleChecksumsTests.swift b/IntegrationTests/Services/AWSS3IntegrationTests/S3FlexibleChecksumsTests.swift index 6880bf25ae8..3b7bab218f8 100644 --- a/IntegrationTests/Services/AWSS3IntegrationTests/S3FlexibleChecksumsTests.swift +++ b/IntegrationTests/Services/AWSS3IntegrationTests/S3FlexibleChecksumsTests.swift @@ -83,7 +83,10 @@ final class S3FlexibleChecksumsTests: S3XCTestCase { } // Streaming unsigned payload without checksum (chunked encoding) - class DisablePayloadSigning: HttpInterceptor { + class DisablePayloadSigning: Interceptor { + typealias RequestType = HTTPRequest + typealias ResponseType = HTTPResponse + func modifyBeforeRetryLoop(context: some MutableRequest) async throws { context.getAttributes().set(key: SmithyHTTPAPIKeys.hasUnsignedPayloadTrait, value: true) } diff --git a/IntegrationTests/XCTestPlans/AWSIntegrationTestsOnCI.xctestplan b/IntegrationTests/XCTestPlans/AWSIntegrationTestsOnCI.xctestplan index 5902e2b04fb..eb8e344e930 100644 --- a/IntegrationTests/XCTestPlans/AWSIntegrationTestsOnCI.xctestplan +++ b/IntegrationTests/XCTestPlans/AWSIntegrationTestsOnCI.xctestplan @@ -4,6 +4,7 @@ "id" : "FF4C1A8F-5D70-4A2A-BFDE-77467500C547", "name" : "Test Scheme Action", "options" : { + } } ], @@ -16,22 +17,22 @@ { "target" : { "containerPath" : "container:", - "identifier" : "AWSS3IntegrationTests", - "name" : "AWSS3IntegrationTests" + "identifier" : "AWSCognitoIdentityIntegrationTests", + "name" : "AWSCognitoIdentityIntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSCloudFrontKeyValueStoreIntegrationTests", - "name" : "AWSCloudFrontKeyValueStoreIntegrationTests" + "identifier" : "AWSSTSIntegrationTests", + "name" : "AWSSTSIntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSEC2IntegrationTests", - "name" : "AWSEC2IntegrationTests" + "identifier" : "AWSTranscribeStreamingIntegrationTests", + "name" : "AWSTranscribeStreamingIntegrationTests" } }, { @@ -44,50 +45,64 @@ { "target" : { "containerPath" : "container:", - "identifier" : "AWSEventBridgeIntegrationTests", - "name" : "AWSEventBridgeIntegrationTests" + "identifier" : "AWSGlacierIntegrationTests", + "name" : "AWSGlacierIntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSKinesisIntegrationTests", - "name" : "AWSKinesisIntegrationTests" + "identifier" : "AWSMediaConvertIntegrationTests", + "name" : "AWSMediaConvertIntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSMediaConvertIntegrationTests", - "name" : "AWSMediaConvertIntegrationTests" + "identifier" : "AWSCloudFrontKeyValueStoreIntegrationTests", + "name" : "AWSCloudFrontKeyValueStoreIntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSRoute53IntegrationTests", - "name" : "AWSRoute53IntegrationTests" + "identifier" : "AWSSQSIntegrationTests", + "name" : "AWSSQSIntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSSQSIntegrationTests", - "name" : "AWSSQSIntegrationTests" + "identifier" : "AWSEventBridgeIntegrationTests", + "name" : "AWSEventBridgeIntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSSTSIntegrationTests", - "name" : "AWSSTSIntegrationTests" + "identifier" : "AWSEC2IntegrationTests", + "name" : "AWSEC2IntegrationTests" } }, { "target" : { "containerPath" : "container:", - "identifier" : "AWSTranscribeStreamingIntegrationTests", - "name" : "AWSTranscribeStreamingIntegrationTests" + "identifier" : "AWSKinesisIntegrationTests", + "name" : "AWSKinesisIntegrationTests" + } + }, + { + "target" : { + "containerPath" : "container:", + "identifier" : "AWSRoute53IntegrationTests", + "name" : "AWSRoute53IntegrationTests" + } + }, + { + "target" : { + "containerPath" : "container:", + "identifier" : "AWSS3IntegrationTests", + "name" : "AWSS3IntegrationTests" } } ], diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AWSS3ErrorWith200StatusXMLMiddleware.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AWSS3ErrorWith200StatusXMLMiddleware.swift index 87e10015059..ff37688e261 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AWSS3ErrorWith200StatusXMLMiddleware.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AWSS3ErrorWith200StatusXMLMiddleware.swift @@ -27,9 +27,11 @@ public struct AWSS3ErrorWith200StatusXMLMiddleware diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkInvocationIdMiddleware.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkInvocationIdMiddleware.swift index 0018c4ba9dc..d1b1c4b5f28 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkInvocationIdMiddleware.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkInvocationIdMiddleware.swift @@ -26,9 +26,11 @@ public struct AmzSdkInvocationIdMiddleware { } } -extension AmzSdkInvocationIdMiddleware: HttpInterceptor { +extension AmzSdkInvocationIdMiddleware: Interceptor { public typealias InputType = InputType public typealias OutputType = OperationStackOutput + public typealias RequestType = HTTPRequest + public typealias ResponseType = HTTPResponse public func modifyBeforeRetryLoop(context: some MutableRequest) async throws { let builder = context.getRequest().toBuilder() diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkRequestMiddleware.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkRequestMiddleware.swift index fb30f184b58..a13cd0d10cf 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkRequestMiddleware.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkRequestMiddleware.swift @@ -53,9 +53,11 @@ public class AmzSdkRequestMiddleware { } -extension AmzSdkRequestMiddleware: HttpInterceptor { +extension AmzSdkRequestMiddleware: Interceptor { public typealias InputType = InputType public typealias OutputType = OperationStackOutput + public typealias RequestType = HTTPRequest + public typealias ResponseType = HTTPResponse public func modifyBeforeSigning(context: some MutableRequest) async throws { let builder = context.getRequest().toBuilder() diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsRequestMiddleware.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsRequestMiddleware.swift index d02abdd23c6..fce7a9b79f8 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsRequestMiddleware.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsRequestMiddleware.swift @@ -92,9 +92,11 @@ public struct FlexibleChecksumsRequestMiddleware) async throws { let builder = context.getRequest().toBuilder() diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsResponseMiddleware.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsResponseMiddleware.swift index 48834405969..b4b4ba23c55 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsResponseMiddleware.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsResponseMiddleware.swift @@ -92,9 +92,11 @@ public struct FlexibleChecksumsResponseMiddleware) async throws { context.getAttributes().set(key: AttributeKey(name: "ChecksumHeaderValidated"), value: nil) diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Route53TrimHostedZoneMiddleware.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Route53TrimHostedZoneMiddleware.swift index 435eb897be4..0e762eae104 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Route53TrimHostedZoneMiddleware.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Route53TrimHostedZoneMiddleware.swift @@ -7,6 +7,7 @@ import class Smithy.Context import ClientRuntime +import SmithyHTTPAPI public struct Route53TrimHostedZoneMiddleware { public let id: Swift.String = "Route53TrimHostedZoneMiddleware" @@ -29,9 +30,11 @@ public struct Route53TrimHostedZoneMiddleware { } } -extension Route53TrimHostedZoneMiddleware: HttpInterceptor { +extension Route53TrimHostedZoneMiddleware: Interceptor { public typealias InputType = Input public typealias OutputType = Output + public typealias RequestType = HTTPRequest + public typealias ResponseType = HTTPResponse public func modifyBeforeSerialization(context: some MutableInput) async throws { context.updateInput(updated: getUpdatedInput(input: context.getInput())) diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Sha256TreeHashMiddleware.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Sha256TreeHashMiddleware.swift index f2578c78c83..06b52ed2be9 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Sha256TreeHashMiddleware.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Sha256TreeHashMiddleware.swift @@ -92,9 +92,11 @@ public struct Sha256TreeHashMiddleware) async throws { let request = context.getRequest() diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/UserAgentMiddleware.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/UserAgentMiddleware.swift index ea02c9fb76d..21eb9de13a9 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/UserAgentMiddleware.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/UserAgentMiddleware.swift @@ -30,9 +30,11 @@ public struct UserAgentMiddleware { } } -extension UserAgentMiddleware: HttpInterceptor { +extension UserAgentMiddleware: Interceptor { public typealias InputType = OperationStackInput public typealias OutputType = OperationStackOutput + public typealias RequestType = HTTPRequest + public typealias ResponseType = HTTPResponse public func modifyBeforeTransmit(context: some MutableRequest) async throws { let awsUserAgentString = AWSUserAgentMetadata.fromConfigAndContext( diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/XAmzTargetMiddleware.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/XAmzTargetMiddleware.swift index cbbc458fc62..b090c5cf01f 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/XAmzTargetMiddleware.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/XAmzTargetMiddleware.swift @@ -19,9 +19,11 @@ public struct XAmzTargetMiddleware { } } -extension XAmzTargetMiddleware: HttpInterceptor { +extension XAmzTargetMiddleware: Interceptor { public typealias InputType = OperationStackInput public typealias OutputType = OperationStackOutput + public typealias RequestType = HTTPRequest + public typealias ResponseType = HTTPResponse public func modifyBeforeRetryLoop(context: some MutableRequest) async throws { let builder = context.getRequest().toBuilder() diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/handlers/PredictInputEndpointURLHostMiddlewareHandler.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/handlers/PredictInputEndpointURLHostMiddlewareHandler.kt index b34ed3b6fed..b3d2fe463ba 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/handlers/PredictInputEndpointURLHostMiddlewareHandler.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/middleware/handlers/PredictInputEndpointURLHostMiddlewareHandler.kt @@ -6,6 +6,7 @@ import software.amazon.smithy.swift.codegen.SwiftWriter import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator import software.amazon.smithy.swift.codegen.swiftmodules.ClientRuntimeTypes import software.amazon.smithy.swift.codegen.swiftmodules.FoundationTypes +import software.amazon.smithy.swift.codegen.swiftmodules.SmithyHTTPAPITypes class PredictInputEndpointURLHostMiddlewareHandler( private val writer: SwiftWriter, @@ -26,10 +27,12 @@ class PredictInputEndpointURLHostMiddlewareHandler( "extension \$L: \$N {", "}", typeName, - ClientRuntimeTypes.Middleware.HttpInterceptor, + ClientRuntimeTypes.Middleware.Interceptor, ) { writer.write("public typealias InputType = PredictInput") writer.write("public typealias OutputType = PredictOutput") + writer.write("public typealias RequestType = \$N", SmithyHTTPAPITypes.HTTPRequest) + writer.write("public typealias ResponseType = \$N", SmithyHTTPAPITypes.HTTPResponse) writer.write("") writer.openBlock( "public func modifyBeforeSerialization(context: some \$N) async throws {",