diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt index 704664f02af..d57b3b6cdb2 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt @@ -53,6 +53,7 @@ abstract class AWSHttpBindingProtocolGenerator : HttpBindingProtocolGenerator() val responseTestBuilder = HttpProtocolUnitTestResponseGenerator.Builder() val errorTestBuilder = HttpProtocolUnitTestErrorGenerator.Builder() open val testsToIgnore: Set = setOf() + open val tagsToIgnore: Set = setOf() override val shouldRenderDecodableBodyStructForInputShapes = true override val shouldRenderCodingKeysForEncodable = true @@ -69,7 +70,8 @@ abstract class AWSHttpBindingProtocolGenerator : HttpBindingProtocolGenerator() getProtocolHttpBindingResolver(ctx, defaultContentType), serdeContext, imports, - testsToIgnore + testsToIgnore, + tagsToIgnore, ).generateProtocolTests() + renderEndpointsTests(ctx) } diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_0_ProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_0_ProtocolGenerator.kt index b74b2f3f897..c68d8e2aa3e 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_0_ProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_0_ProtocolGenerator.kt @@ -32,15 +32,16 @@ open class AwsJson1_0_ProtocolGenerator : AWSHttpBindingProtocolGenerator() { override val httpResponseGenerator = HttpResponseGenerator( unknownServiceErrorSymbol, defaultTimestampFormat, - AWSJsonHttpResponseBindingErrorGenerator() + AWSJsonHttpResponseBindingErrorGenerator(), ) override val serdeContext = serdeContextJSON override val shouldRenderEncodableConformance: Boolean = true override val shouldRenderDecodableBodyStructForInputShapes: Boolean = true override val testsToIgnore = setOf( "SDKAppliedContentEncoding_awsJson1_0", - "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_0" + "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_0", ) + override val tagsToIgnore = setOf("defaults") override fun getProtocolHttpBindingResolver(ctx: ProtocolGenerator.GenerationContext, defaultContentType: String): HttpBindingResolver = AwsJsonHttpBindingResolver(ctx, defaultContentType) diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_1_ProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_1_ProtocolGenerator.kt index f46027ef00d..dee34af70e4 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_1_ProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_1_ProtocolGenerator.kt @@ -32,15 +32,16 @@ class AwsJson1_1_ProtocolGenerator : AWSHttpBindingProtocolGenerator() { override val httpResponseGenerator = HttpResponseGenerator( unknownServiceErrorSymbol, defaultTimestampFormat, - AWSJsonHttpResponseBindingErrorGenerator() + AWSJsonHttpResponseBindingErrorGenerator(), ) override val serdeContext = serdeContextJSON override val shouldRenderEncodableConformance: Boolean = true override val shouldRenderDecodableBodyStructForInputShapes: Boolean = true override val testsToIgnore = setOf( "SDKAppliedContentEncoding_awsJson1_1", - "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_1" + "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_1", ) + override val tagsToIgnore = setOf("defaults") override fun getProtocolHttpBindingResolver(ctx: ProtocolGenerator.GenerationContext, defaultContentType: String): HttpBindingResolver = AwsJsonHttpBindingResolver(ctx, defaultContentType) diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AwsQueryProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AwsQueryProtocolGenerator.kt index 60fc0e06b3b..ba8268c0e7f 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AwsQueryProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AwsQueryProtocolGenerator.kt @@ -44,7 +44,7 @@ open class AwsQueryProtocolGenerator : AWSHttpBindingProtocolGenerator() { unknownServiceErrorSymbol, defaultTimestampFormat, AWSRestXMLHttpResponseBindingErrorGenerator(), - AWSXMLHttpResponseBindingErrorInitGeneratorFactory() + AWSXMLHttpResponseBindingErrorInitGeneratorFactory(), ) override val serdeContext = HttpProtocolUnitTestGenerator.SerdeContext("FormURLEncoder()", "XMLDecoder()") @@ -56,8 +56,9 @@ open class AwsQueryProtocolGenerator : AWSHttpBindingProtocolGenerator() { override val shouldRenderEncodableConformance = true override val testsToIgnore = setOf( "SDKAppliedContentEncoding_awsQuery", - "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsQuery" + "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsQuery", ) + override val tagsToIgnore = setOf("defaults") override fun renderStructEncode( ctx: ProtocolGenerator.GenerationContext, shapeContainingMembers: Shape, @@ -65,7 +66,7 @@ open class AwsQueryProtocolGenerator : AWSHttpBindingProtocolGenerator() { members: List, writer: SwiftWriter, defaultTimestampFormat: TimestampFormatTrait.Format, - path: String? + path: String?, ) { val customizations = AwsQueryFormURLEncodeCustomizations() val encoder = StructEncodeFormURLGenerator(ctx, customizations, shapeContainingMembers, shapeMetadata, members, writer, defaultTimestampFormat) @@ -78,7 +79,7 @@ open class AwsQueryProtocolGenerator : AWSHttpBindingProtocolGenerator() { members: List, writer: SwiftWriter, defaultTimestampFormat: TimestampFormatTrait.Format, - path: String + path: String, ) { val decoder = AwsQueryStructDecodeXMLGenerator(ctx, members, shapeMetadata, writer, defaultTimestampFormat) decoder.render() diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/ec2query/Ec2QueryProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/ec2query/Ec2QueryProtocolGenerator.kt index 92eee9046b2..737accb6d4f 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/ec2query/Ec2QueryProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/ec2query/Ec2QueryProtocolGenerator.kt @@ -40,7 +40,7 @@ class Ec2QueryProtocolGenerator : AWSHttpBindingProtocolGenerator() { unknownServiceErrorSymbol, defaultTimestampFormat, AWSEc2QueryHttpResponseBindingErrorGenerator(), - AWSEc2QueryHttpResponseBindingErrorInitGeneratorFactory() + AWSEc2QueryHttpResponseBindingErrorInitGeneratorFactory(), ) override val serdeContext = HttpProtocolUnitTestGenerator.SerdeContext("FormURLEncoder()", "XMLDecoder()") @@ -52,8 +52,9 @@ class Ec2QueryProtocolGenerator : AWSHttpBindingProtocolGenerator() { override val shouldRenderEncodableConformance = true override val testsToIgnore = setOf( "SDKAppliedContentEncoding_ec2Query", - "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_ec2Query" + "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_ec2Query", ) + override val tagsToIgnore = setOf("defaults") override fun renderStructEncode( ctx: ProtocolGenerator.GenerationContext, shapeContainingMembers: Shape, @@ -61,7 +62,7 @@ class Ec2QueryProtocolGenerator : AWSHttpBindingProtocolGenerator() { members: List, writer: SwiftWriter, defaultTimestampFormat: TimestampFormatTrait.Format, - path: String? + path: String?, ) { val customizations = Ec2QueryFormURLEncodeCustomizations() val encoder = StructEncodeFormURLGenerator(ctx, customizations, shapeContainingMembers, shapeMetadata, members, writer, defaultTimestampFormat) @@ -74,7 +75,7 @@ class Ec2QueryProtocolGenerator : AWSHttpBindingProtocolGenerator() { members: List, writer: SwiftWriter, defaultTimestampFormat: TimestampFormatTrait.Format, - path: String + path: String, ) { val decoder = StructDecodeXMLGenerator(ctx, members, mapOf(), writer, defaultTimestampFormat) decoder.render() diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restjson/AWSRestJson1ProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restjson/AWSRestJson1ProtocolGenerator.kt index 2ae4d1c161c..5174e33eacb 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restjson/AWSRestJson1ProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restjson/AWSRestJson1ProtocolGenerator.kt @@ -25,14 +25,15 @@ class AWSRestJson1ProtocolGenerator : AWSHttpBindingProtocolGenerator() { override val httpResponseGenerator = HttpResponseGenerator( unknownServiceErrorSymbol, defaultTimestampFormat, - AWSRestJson1HttpResponseBindingErrorGeneratable() + AWSRestJson1HttpResponseBindingErrorGeneratable(), ) override val serdeContext = serdeContextJSON override val testsToIgnore = setOf( "SDKAppliedContentEncoding_restJson1", "SDKAppendedGzipAfterProvidedEncoding_restJson1", - "RestJsonHttpPayloadWithUnsetUnion" + "RestJsonHttpPayloadWithUnsetUnion", ) + override val tagsToIgnore = setOf("defaults") override fun generateMessageMarshallable(ctx: ProtocolGenerator.GenerationContext) { var streamingShapes = outputStreamingShapes(ctx) diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/RestXmlProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/RestXmlProtocolGenerator.kt index 63099cece3b..7e18cdf76e7 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/RestXmlProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/RestXmlProtocolGenerator.kt @@ -31,7 +31,7 @@ class RestXmlProtocolGenerator : AWSHttpBindingProtocolGenerator() { unknownServiceErrorSymbol, defaultTimestampFormat, AWSRestXMLHttpResponseBindingErrorGenerator(), - AWSXMLHttpResponseBindingErrorInitGeneratorFactory() + AWSXMLHttpResponseBindingErrorInitGeneratorFactory(), ) override val shouldRenderDecodableBodyStructForInputShapes = false override val serdeContext = serdeContextXML @@ -47,8 +47,9 @@ class RestXmlProtocolGenerator : AWSHttpBindingProtocolGenerator() { "S3EscapePathObjectKeyInUriLabel", "SDKAppliedContentEncoding_restXml", "SDKAppendedGzipAfterProvidedEncoding_restXml", - "S3OperationNoErrorWrappingResponse" + "S3OperationNoErrorWrappingResponse", ) + override val tagsToIgnore = setOf("defaults") override val codableProtocol = SwiftTypes.Protocols.Decodable override val encodableProtocol = null @@ -61,7 +62,7 @@ class RestXmlProtocolGenerator : AWSHttpBindingProtocolGenerator() { members: List, writer: SwiftWriter, defaultTimestampFormat: TimestampFormatTrait.Format, - path: String? + path: String?, ) { val encoder = StructEncodeXMLGenerator(ctx, shapeContainingMembers, members, writer) encoder.render() @@ -73,7 +74,7 @@ class RestXmlProtocolGenerator : AWSHttpBindingProtocolGenerator() { members: List, writer: SwiftWriter, defaultTimestampFormat: TimestampFormatTrait.Format, - path: String + path: String, ) { val decoder = RestXmlStructDecodeXMLGenerator(ctx, members, shapeMetadata, writer, defaultTimestampFormat) decoder.render() diff --git a/gradle.properties b/gradle.properties index f927f088d02..5bdc72faa84 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ kotlin.code.style=official org.gradle.jvmargs=-Xmx4096M # codegen -smithyVersion=1.39.0 +smithyVersion=1.42.0 smithyGradleVersion=0.6.0 smithySwiftVersion = 0.1.0