diff --git a/.changes/ece99a81-4736-43df-a20e-9a367e36370b.json b/.changes/ece99a81-4736-43df-a20e-9a367e36370b.json new file mode 100644 index 0000000000..9e71ff0003 --- /dev/null +++ b/.changes/ece99a81-4736-43df-a20e-9a367e36370b.json @@ -0,0 +1,5 @@ +{ + "id": "ece99a81-4736-43df-a20e-9a367e36370b", + "type": "feature", + "description": "Start generating default implementations for generic clients" +} \ No newline at end of file diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/resources/META-INF/services/software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration b/codegen/smithy-aws-kotlin-codegen/src/main/resources/META-INF/services/software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration index 07cdaabee7..c269c549f0 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/resources/META-INF/services/software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration +++ b/codegen/smithy-aws-kotlin-codegen/src/main/resources/META-INF/services/software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration @@ -1,3 +1,2 @@ -software.amazon.smithy.kotlin.codegen.aws.SdkProtocolGeneratorSupplier software.amazon.smithy.kotlin.codegen.aws.customization.RegionSupport software.amazon.smithy.kotlin.codegen.aws.middleware.ClockSkew diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/SdkProtocolGeneratorSupplier.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/ProtocolGeneratorSupplier.kt similarity index 58% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/SdkProtocolGeneratorSupplier.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/ProtocolGeneratorSupplier.kt index 1e81c5ac3a..5619617769 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/SdkProtocolGeneratorSupplier.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/ProtocolGeneratorSupplier.kt @@ -2,24 +2,18 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws -import software.amazon.smithy.kotlin.codegen.aws.protocols.* +package software.amazon.smithy.kotlin.codegen + import software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration +import software.amazon.smithy.kotlin.codegen.protocols.* import software.amazon.smithy.kotlin.codegen.rendering.protocol.ProtocolGenerator /** - * Integration that registers protocol generators this package provides + * Integration that registers protocol generators */ -class SdkProtocolGeneratorSupplier : KotlinIntegration { - /** - * Gets the sort order of the customization from -128 to 127, with lowest - * executed first. - * - * @return Returns the sort order, defaults to -10. - */ +class ProtocolGeneratorSupplier : KotlinIntegration { override val order: Byte = -10 - override val protocolGenerators: List = listOf( AwsJson1_0(), diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/AwsJson1_0.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/AwsJson1_0.kt similarity index 76% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/AwsJson1_0.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/AwsJson1_0.kt index c2d1a51d28..311b34ddb5 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/AwsJson1_0.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/AwsJson1_0.kt @@ -2,14 +2,14 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols +package software.amazon.smithy.kotlin.codegen.protocols import software.amazon.smithy.aws.traits.protocols.AwsJson1_0Trait -import software.amazon.smithy.kotlin.codegen.aws.protocols.core.AwsHttpBindingProtocolGenerator -import software.amazon.smithy.kotlin.codegen.aws.protocols.json.AwsJsonHttpBindingResolver -import software.amazon.smithy.kotlin.codegen.aws.protocols.json.AwsJsonProtocolMiddleware -import software.amazon.smithy.kotlin.codegen.aws.protocols.json.AwsJsonProtocolParserGenerator -import software.amazon.smithy.kotlin.codegen.aws.protocols.json.JsonHttpBindingProtocolGenerator +import software.amazon.smithy.kotlin.codegen.protocols.core.AwsHttpBindingProtocolGenerator +import software.amazon.smithy.kotlin.codegen.protocols.json.AwsJsonHttpBindingResolver +import software.amazon.smithy.kotlin.codegen.protocols.json.AwsJsonProtocolMiddleware +import software.amazon.smithy.kotlin.codegen.protocols.json.AwsJsonProtocolParserGenerator +import software.amazon.smithy.kotlin.codegen.protocols.json.JsonHttpBindingProtocolGenerator import software.amazon.smithy.kotlin.codegen.rendering.protocol.HttpBindingResolver import software.amazon.smithy.kotlin.codegen.rendering.protocol.ProtocolGenerator import software.amazon.smithy.kotlin.codegen.rendering.protocol.ProtocolMiddleware diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/AwsJson1_1.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/AwsJson1_1.kt similarity index 76% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/AwsJson1_1.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/AwsJson1_1.kt index e8d829ac0a..1bb49f46be 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/AwsJson1_1.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/AwsJson1_1.kt @@ -3,14 +3,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols +package software.amazon.smithy.kotlin.codegen.protocols import software.amazon.smithy.aws.traits.protocols.AwsJson1_1Trait -import software.amazon.smithy.kotlin.codegen.aws.protocols.core.AwsHttpBindingProtocolGenerator -import software.amazon.smithy.kotlin.codegen.aws.protocols.json.AwsJsonHttpBindingResolver -import software.amazon.smithy.kotlin.codegen.aws.protocols.json.AwsJsonProtocolMiddleware -import software.amazon.smithy.kotlin.codegen.aws.protocols.json.AwsJsonProtocolParserGenerator -import software.amazon.smithy.kotlin.codegen.aws.protocols.json.JsonHttpBindingProtocolGenerator +import software.amazon.smithy.kotlin.codegen.protocols.core.AwsHttpBindingProtocolGenerator +import software.amazon.smithy.kotlin.codegen.protocols.json.AwsJsonHttpBindingResolver +import software.amazon.smithy.kotlin.codegen.protocols.json.AwsJsonProtocolMiddleware +import software.amazon.smithy.kotlin.codegen.protocols.json.AwsJsonProtocolParserGenerator +import software.amazon.smithy.kotlin.codegen.protocols.json.JsonHttpBindingProtocolGenerator import software.amazon.smithy.kotlin.codegen.rendering.protocol.HttpBindingResolver import software.amazon.smithy.kotlin.codegen.rendering.protocol.ProtocolGenerator import software.amazon.smithy.kotlin.codegen.rendering.protocol.ProtocolMiddleware diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/AwsQuery.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/AwsQuery.kt similarity index 93% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/AwsQuery.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/AwsQuery.kt index 853ed38a55..58b57a77f6 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/AwsQuery.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/AwsQuery.kt @@ -3,14 +3,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols +package software.amazon.smithy.kotlin.codegen.protocols import software.amazon.smithy.aws.traits.protocols.AwsQueryErrorTrait import software.amazon.smithy.aws.traits.protocols.AwsQueryTrait -import software.amazon.smithy.kotlin.codegen.aws.protocols.core.AbstractQueryFormUrlSerializerGenerator -import software.amazon.smithy.kotlin.codegen.aws.protocols.core.AwsHttpBindingProtocolGenerator -import software.amazon.smithy.kotlin.codegen.aws.protocols.core.QueryHttpBindingProtocolGenerator -import software.amazon.smithy.kotlin.codegen.aws.protocols.formurl.QuerySerdeFormUrlDescriptorGenerator import software.amazon.smithy.kotlin.codegen.core.KotlinWriter import software.amazon.smithy.kotlin.codegen.core.RenderingContext import software.amazon.smithy.kotlin.codegen.core.RuntimeTypes @@ -19,6 +15,10 @@ import software.amazon.smithy.kotlin.codegen.lang.KotlinTypes import software.amazon.smithy.kotlin.codegen.model.buildSymbol import software.amazon.smithy.kotlin.codegen.model.getTrait import software.amazon.smithy.kotlin.codegen.model.hasTrait +import software.amazon.smithy.kotlin.codegen.protocols.core.AbstractQueryFormUrlSerializerGenerator +import software.amazon.smithy.kotlin.codegen.protocols.core.AwsHttpBindingProtocolGenerator +import software.amazon.smithy.kotlin.codegen.protocols.core.QueryHttpBindingProtocolGenerator +import software.amazon.smithy.kotlin.codegen.protocols.formurl.QuerySerdeFormUrlDescriptorGenerator import software.amazon.smithy.kotlin.codegen.rendering.protocol.ProtocolGenerator import software.amazon.smithy.kotlin.codegen.rendering.protocol.toRenderingContext import software.amazon.smithy.kotlin.codegen.rendering.serde.FormUrlSerdeDescriptorGenerator diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/Ec2Query.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/Ec2Query.kt similarity index 95% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/Ec2Query.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/Ec2Query.kt index b84f22f442..9da7d0d748 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/Ec2Query.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/Ec2Query.kt @@ -2,14 +2,11 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols +package software.amazon.smithy.kotlin.codegen.protocols import software.amazon.smithy.aws.traits.protocols.Ec2QueryNameTrait import software.amazon.smithy.aws.traits.protocols.Ec2QueryTrait import software.amazon.smithy.codegen.core.Symbol -import software.amazon.smithy.kotlin.codegen.aws.protocols.core.AbstractQueryFormUrlSerializerGenerator -import software.amazon.smithy.kotlin.codegen.aws.protocols.core.QueryHttpBindingProtocolGenerator -import software.amazon.smithy.kotlin.codegen.aws.protocols.formurl.QuerySerdeFormUrlDescriptorGenerator import software.amazon.smithy.kotlin.codegen.core.KotlinWriter import software.amazon.smithy.kotlin.codegen.core.RenderingContext import software.amazon.smithy.kotlin.codegen.core.RuntimeTypes @@ -17,6 +14,9 @@ import software.amazon.smithy.kotlin.codegen.core.withBlock import software.amazon.smithy.kotlin.codegen.model.buildSymbol import software.amazon.smithy.kotlin.codegen.model.getTrait import software.amazon.smithy.kotlin.codegen.model.isNullable +import software.amazon.smithy.kotlin.codegen.protocols.core.AbstractQueryFormUrlSerializerGenerator +import software.amazon.smithy.kotlin.codegen.protocols.core.QueryHttpBindingProtocolGenerator +import software.amazon.smithy.kotlin.codegen.protocols.formurl.QuerySerdeFormUrlDescriptorGenerator import software.amazon.smithy.kotlin.codegen.rendering.protocol.ProtocolGenerator import software.amazon.smithy.kotlin.codegen.rendering.protocol.toRenderingContext import software.amazon.smithy.kotlin.codegen.rendering.serde.* diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RestJson1.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RestJson1.kt similarity index 90% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RestJson1.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RestJson1.kt index dcf2f0a814..d5029fb485 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RestJson1.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RestJson1.kt @@ -2,16 +2,16 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols +package software.amazon.smithy.kotlin.codegen.protocols import software.amazon.smithy.aws.traits.protocols.RestJson1Trait -import software.amazon.smithy.kotlin.codegen.aws.protocols.core.AwsHttpBindingProtocolGenerator -import software.amazon.smithy.kotlin.codegen.aws.protocols.json.AwsJsonProtocolParserGenerator -import software.amazon.smithy.kotlin.codegen.aws.protocols.json.JsonHttpBindingProtocolGenerator import software.amazon.smithy.kotlin.codegen.core.KotlinWriter import software.amazon.smithy.kotlin.codegen.core.RuntimeTypes import software.amazon.smithy.kotlin.codegen.core.defaultName import software.amazon.smithy.kotlin.codegen.core.withBlock +import software.amazon.smithy.kotlin.codegen.protocols.core.AwsHttpBindingProtocolGenerator +import software.amazon.smithy.kotlin.codegen.protocols.json.AwsJsonProtocolParserGenerator +import software.amazon.smithy.kotlin.codegen.protocols.json.JsonHttpBindingProtocolGenerator import software.amazon.smithy.kotlin.codegen.rendering.protocol.* import software.amazon.smithy.kotlin.codegen.rendering.serde.StructuredDataParserGenerator import software.amazon.smithy.model.Model diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RestXml.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RestXml.kt similarity index 96% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RestXml.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RestXml.kt index c7c834c317..277e65fc48 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RestXml.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RestXml.kt @@ -3,16 +3,16 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols +package software.amazon.smithy.kotlin.codegen.protocols import software.amazon.smithy.aws.traits.protocols.RestXmlTrait import software.amazon.smithy.codegen.core.Symbol -import software.amazon.smithy.kotlin.codegen.aws.protocols.core.AwsHttpBindingProtocolGenerator -import software.amazon.smithy.kotlin.codegen.aws.protocols.xml.RestXmlSerdeDescriptorGenerator import software.amazon.smithy.kotlin.codegen.core.KotlinWriter import software.amazon.smithy.kotlin.codegen.core.RuntimeTypes import software.amazon.smithy.kotlin.codegen.core.withBlock import software.amazon.smithy.kotlin.codegen.model.* +import software.amazon.smithy.kotlin.codegen.protocols.core.AwsHttpBindingProtocolGenerator +import software.amazon.smithy.kotlin.codegen.protocols.xml.RestXmlSerdeDescriptorGenerator import software.amazon.smithy.kotlin.codegen.rendering.protocol.* import software.amazon.smithy.kotlin.codegen.rendering.serde.* import software.amazon.smithy.model.Model @@ -223,7 +223,8 @@ class RestXmlSerializerGenerator( shape: Shape, members: List, writer: KotlinWriter, - ): XmlSerdeDescriptorGenerator = RestXmlSerdeDescriptorGenerator(ctx.toRenderingContext(protocolGenerator, shape, writer), members) + ): XmlSerdeDescriptorGenerator = + RestXmlSerdeDescriptorGenerator(ctx.toRenderingContext(protocolGenerator, shape, writer), members) override fun payloadSerializer( ctx: ProtocolGenerator.GenerationContext, diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RpcV2Cbor.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RpcV2Cbor.kt similarity index 97% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RpcV2Cbor.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RpcV2Cbor.kt index 117574da40..98da2152c1 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RpcV2Cbor.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RpcV2Cbor.kt @@ -2,14 +2,14 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols +package software.amazon.smithy.kotlin.codegen.protocols -import software.amazon.smithy.kotlin.codegen.aws.protocols.core.AwsHttpBindingProtocolGenerator -import software.amazon.smithy.kotlin.codegen.aws.protocols.core.StaticHttpBindingResolver import software.amazon.smithy.kotlin.codegen.core.KotlinWriter import software.amazon.smithy.kotlin.codegen.core.RuntimeTypes import software.amazon.smithy.kotlin.codegen.model.* import software.amazon.smithy.kotlin.codegen.model.traits.SyntheticClone +import software.amazon.smithy.kotlin.codegen.protocols.core.AwsHttpBindingProtocolGenerator +import software.amazon.smithy.kotlin.codegen.protocols.core.StaticHttpBindingResolver import software.amazon.smithy.kotlin.codegen.rendering.protocol.* import software.amazon.smithy.kotlin.codegen.rendering.serde.CborParserGenerator import software.amazon.smithy.kotlin.codegen.rendering.serde.CborSerializerGenerator diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/core/AwsHttpBindingProtocolGenerator.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGenerator.kt similarity index 96% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/core/AwsHttpBindingProtocolGenerator.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGenerator.kt index 5ed2453f14..866725cedb 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/core/AwsHttpBindingProtocolGenerator.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGenerator.kt @@ -2,18 +2,18 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.core +package software.amazon.smithy.kotlin.codegen.protocols.core import software.amazon.smithy.aws.traits.protocols.AwsQueryCompatibleTrait import software.amazon.smithy.codegen.core.Symbol -import software.amazon.smithy.kotlin.codegen.aws.protocols.eventstream.EventStreamParserGenerator -import software.amazon.smithy.kotlin.codegen.aws.protocols.eventstream.EventStreamSerializerGenerator import software.amazon.smithy.kotlin.codegen.core.* import software.amazon.smithy.kotlin.codegen.integration.SectionId import software.amazon.smithy.kotlin.codegen.integration.SectionKey import software.amazon.smithy.kotlin.codegen.lang.KotlinTypes import software.amazon.smithy.kotlin.codegen.model.buildSymbol import software.amazon.smithy.kotlin.codegen.model.hasTrait +import software.amazon.smithy.kotlin.codegen.protocols.eventstream.EventStreamParserGenerator +import software.amazon.smithy.kotlin.codegen.protocols.eventstream.EventStreamSerializerGenerator import software.amazon.smithy.kotlin.codegen.rendering.ExceptionBaseClassGenerator import software.amazon.smithy.kotlin.codegen.rendering.protocol.* import software.amazon.smithy.model.shapes.OperationShape diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/core/QueryHttpBindingProtocolGenerator.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/core/QueryHttpBindingProtocolGenerator.kt similarity index 99% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/core/QueryHttpBindingProtocolGenerator.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/core/QueryHttpBindingProtocolGenerator.kt index db97349f84..08eeb5d40a 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/core/QueryHttpBindingProtocolGenerator.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/core/QueryHttpBindingProtocolGenerator.kt @@ -2,7 +2,7 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.core +package software.amazon.smithy.kotlin.codegen.protocols.core import software.amazon.smithy.codegen.core.Symbol import software.amazon.smithy.kotlin.codegen.core.KotlinWriter diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/core/StaticHttpBindingResolver.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/core/StaticHttpBindingResolver.kt similarity index 98% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/core/StaticHttpBindingResolver.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/core/StaticHttpBindingResolver.kt index f549d0ed4c..8e2c898aa1 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/core/StaticHttpBindingResolver.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/core/StaticHttpBindingResolver.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.core +package software.amazon.smithy.kotlin.codegen.protocols.core import software.amazon.smithy.kotlin.codegen.model.expectTrait import software.amazon.smithy.kotlin.codegen.model.hasTrait diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/eventstream/EventStreamParserGenerator.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/eventstream/EventStreamParserGenerator.kt similarity index 99% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/eventstream/EventStreamParserGenerator.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/eventstream/EventStreamParserGenerator.kt index acc14a044a..8c28c8b6b9 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/eventstream/EventStreamParserGenerator.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/eventstream/EventStreamParserGenerator.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.eventstream +package software.amazon.smithy.kotlin.codegen.protocols.eventstream import software.amazon.smithy.codegen.core.CodegenException import software.amazon.smithy.codegen.core.Symbol diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/eventstream/EventStreamSerializerGenerator.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/eventstream/EventStreamSerializerGenerator.kt similarity index 99% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/eventstream/EventStreamSerializerGenerator.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/eventstream/EventStreamSerializerGenerator.kt index d7e721e928..fd87d10819 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/eventstream/EventStreamSerializerGenerator.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/eventstream/EventStreamSerializerGenerator.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.eventstream +package software.amazon.smithy.kotlin.codegen.protocols.eventstream import software.amazon.smithy.codegen.core.CodegenException import software.amazon.smithy.codegen.core.Symbol diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/formurl/QuerySerdeFormUrlDescriptorGenerator.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/formurl/QuerySerdeFormUrlDescriptorGenerator.kt similarity index 96% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/formurl/QuerySerdeFormUrlDescriptorGenerator.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/formurl/QuerySerdeFormUrlDescriptorGenerator.kt index 994b242aa4..31219a7126 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/formurl/QuerySerdeFormUrlDescriptorGenerator.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/formurl/QuerySerdeFormUrlDescriptorGenerator.kt @@ -2,7 +2,7 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.formurl +package software.amazon.smithy.kotlin.codegen.protocols.formurl import software.amazon.smithy.kotlin.codegen.core.RenderingContext import software.amazon.smithy.kotlin.codegen.core.RuntimeTypes diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonHttpBindingResolver.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonHttpBindingResolver.kt similarity index 84% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonHttpBindingResolver.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonHttpBindingResolver.kt index eba5e59078..f1dc23dcbc 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonHttpBindingResolver.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonHttpBindingResolver.kt @@ -3,9 +3,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.json +package software.amazon.smithy.kotlin.codegen.protocols.json -import software.amazon.smithy.kotlin.codegen.aws.protocols.core.StaticHttpBindingResolver +import software.amazon.smithy.kotlin.codegen.protocols.core.StaticHttpBindingResolver import software.amazon.smithy.model.Model import software.amazon.smithy.model.pattern.UriPattern import software.amazon.smithy.model.shapes.ServiceShape diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonProtocolMiddleware.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonProtocolMiddleware.kt similarity index 94% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonProtocolMiddleware.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonProtocolMiddleware.kt index e9ecfb37db..e09050435b 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonProtocolMiddleware.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonProtocolMiddleware.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.json +package software.amazon.smithy.kotlin.codegen.protocols.json import software.amazon.smithy.kotlin.codegen.core.KotlinWriter import software.amazon.smithy.kotlin.codegen.core.RuntimeTypes diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonProtocolParserGenerator.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonProtocolParserGenerator.kt similarity index 95% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonProtocolParserGenerator.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonProtocolParserGenerator.kt index e98d29acf1..bef0db0fde 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonProtocolParserGenerator.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonProtocolParserGenerator.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.json +package software.amazon.smithy.kotlin.codegen.protocols.json import software.amazon.smithy.kotlin.codegen.core.KotlinWriter import software.amazon.smithy.kotlin.codegen.rendering.protocol.ProtocolGenerator diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonProtocolSerdeDescriptorGenerator.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonProtocolSerdeDescriptorGenerator.kt similarity index 96% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonProtocolSerdeDescriptorGenerator.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonProtocolSerdeDescriptorGenerator.kt index a6471e992f..331756dfff 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonProtocolSerdeDescriptorGenerator.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonProtocolSerdeDescriptorGenerator.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.json +package software.amazon.smithy.kotlin.codegen.protocols.json import software.amazon.smithy.kotlin.codegen.core.RenderingContext import software.amazon.smithy.kotlin.codegen.core.RuntimeTypes diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/JsonHttpBindingProtocolGenerator.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/JsonHttpBindingProtocolGenerator.kt similarity index 91% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/JsonHttpBindingProtocolGenerator.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/JsonHttpBindingProtocolGenerator.kt index 7e82faae3d..ad106b96d1 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/JsonHttpBindingProtocolGenerator.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/JsonHttpBindingProtocolGenerator.kt @@ -3,11 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.json +package software.amazon.smithy.kotlin.codegen.protocols.json -import software.amazon.smithy.kotlin.codegen.aws.protocols.core.AwsHttpBindingProtocolGenerator import software.amazon.smithy.kotlin.codegen.core.KotlinWriter import software.amazon.smithy.kotlin.codegen.core.RuntimeTypes +import software.amazon.smithy.kotlin.codegen.protocols.core.AwsHttpBindingProtocolGenerator import software.amazon.smithy.kotlin.codegen.rendering.protocol.ProtocolGenerator import software.amazon.smithy.kotlin.codegen.rendering.serde.* import software.amazon.smithy.model.shapes.OperationShape diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/xml/RestXmlSerdeDescriptorGenerator.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/xml/RestXmlSerdeDescriptorGenerator.kt similarity index 96% rename from codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/xml/RestXmlSerdeDescriptorGenerator.kt rename to codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/xml/RestXmlSerdeDescriptorGenerator.kt index 37916b4db8..e6e132bcfc 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/xml/RestXmlSerdeDescriptorGenerator.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/protocols/xml/RestXmlSerdeDescriptorGenerator.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.xml +package software.amazon.smithy.kotlin.codegen.protocols.xml import software.amazon.smithy.kotlin.codegen.core.RenderingContext import software.amazon.smithy.kotlin.codegen.core.RuntimeTypes diff --git a/codegen/smithy-kotlin-codegen/src/main/resources/META-INF/services/software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration b/codegen/smithy-kotlin-codegen/src/main/resources/META-INF/services/software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration index 2ab7fe506a..e8af97d7fd 100644 --- a/codegen/smithy-kotlin-codegen/src/main/resources/META-INF/services/software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration +++ b/codegen/smithy-kotlin-codegen/src/main/resources/META-INF/services/software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration @@ -13,4 +13,5 @@ software.amazon.smithy.kotlin.codegen.rendering.endpoints.SdkEndpointBuiltinInte software.amazon.smithy.kotlin.codegen.rendering.compression.RequestCompressionIntegration software.amazon.smithy.kotlin.codegen.rendering.auth.SigV4AsymmetricAuthSchemeIntegration software.amazon.smithy.kotlin.codegen.rendering.smoketests.SmokeTestsIntegration -software.amazon.smithy.kotlin.codegen.rendering.checksums.HttpChecksumRequiredIntegration \ No newline at end of file +software.amazon.smithy.kotlin.codegen.rendering.checksums.HttpChecksumRequiredIntegration +software.amazon.smithy.kotlin.codegen.ProtocolGeneratorSupplier diff --git a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/AwsQueryTest.kt b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/AwsQueryTest.kt similarity index 98% rename from codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/AwsQueryTest.kt rename to codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/AwsQueryTest.kt index 244d265375..09e9bf29b8 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/AwsQueryTest.kt +++ b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/AwsQueryTest.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols +package software.amazon.smithy.kotlin.codegen.protocols import software.amazon.smithy.kotlin.codegen.test.* import kotlin.test.Test diff --git a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RestJson1Test.kt b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RestJson1Test.kt similarity index 98% rename from codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RestJson1Test.kt rename to codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RestJson1Test.kt index 4013d91887..dfec4db4cf 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RestJson1Test.kt +++ b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RestJson1Test.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols +package software.amazon.smithy.kotlin.codegen.protocols import software.amazon.smithy.kotlin.codegen.test.* import kotlin.test.Test diff --git a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RestXmlTest.kt b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RestXmlTest.kt similarity index 98% rename from codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RestXmlTest.kt rename to codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RestXmlTest.kt index b13d5723fb..eef4bb1ecc 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RestXmlTest.kt +++ b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RestXmlTest.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols +package software.amazon.smithy.kotlin.codegen.protocols import software.amazon.smithy.kotlin.codegen.test.* import kotlin.test.Test diff --git a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RpcV2CborTest.kt b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RpcV2CborTest.kt similarity index 99% rename from codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RpcV2CborTest.kt rename to codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RpcV2CborTest.kt index a52456d61a..693a8a9070 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/RpcV2CborTest.kt +++ b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/RpcV2CborTest.kt @@ -2,7 +2,7 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols +package software.amazon.smithy.kotlin.codegen.protocols import io.kotest.matchers.string.shouldNotContain import software.amazon.smithy.kotlin.codegen.test.* diff --git a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/core/AwsHttpBindingProtocolGeneratorTest.kt b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGeneratorTest.kt similarity index 98% rename from codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/core/AwsHttpBindingProtocolGeneratorTest.kt rename to codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGeneratorTest.kt index a0bcd03bad..66d120f1a2 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/core/AwsHttpBindingProtocolGeneratorTest.kt +++ b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGeneratorTest.kt @@ -2,12 +2,12 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.core +package software.amazon.smithy.kotlin.codegen.protocols.core import software.amazon.smithy.codegen.core.Symbol -import software.amazon.smithy.kotlin.codegen.aws.protocols.json.AwsJsonHttpBindingResolver import software.amazon.smithy.kotlin.codegen.core.KotlinWriter import software.amazon.smithy.kotlin.codegen.model.expectShape +import software.amazon.smithy.kotlin.codegen.protocols.json.AwsJsonHttpBindingResolver import software.amazon.smithy.kotlin.codegen.rendering.protocol.HttpBindingResolver import software.amazon.smithy.kotlin.codegen.rendering.protocol.ProtocolGenerator import software.amazon.smithy.kotlin.codegen.rendering.serde.* diff --git a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonHttpBindingResolverTest.kt b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonHttpBindingResolverTest.kt similarity index 98% rename from codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonHttpBindingResolverTest.kt rename to codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonHttpBindingResolverTest.kt index 5603623974..1febec7f11 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonHttpBindingResolverTest.kt +++ b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonHttpBindingResolverTest.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.json +package software.amazon.smithy.kotlin.codegen.protocols.json import software.amazon.smithy.kotlin.codegen.model.expectShape import software.amazon.smithy.kotlin.codegen.test.newTestContext diff --git a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonProtocolSerdeDescriptorGeneratorTest.kt b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonProtocolSerdeDescriptorGeneratorTest.kt similarity index 97% rename from codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonProtocolSerdeDescriptorGeneratorTest.kt rename to codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonProtocolSerdeDescriptorGeneratorTest.kt index 871f1d2481..653f495f4f 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/json/AwsJsonProtocolSerdeDescriptorGeneratorTest.kt +++ b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/json/AwsJsonProtocolSerdeDescriptorGeneratorTest.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.json +package software.amazon.smithy.kotlin.codegen.protocols.json import software.amazon.smithy.kotlin.codegen.test.* import software.amazon.smithy.model.shapes.ShapeId diff --git a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/xml/RestXmlSerdeDescriptorGeneratorTest.kt b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/xml/RestXmlSerdeDescriptorGeneratorTest.kt similarity index 96% rename from codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/xml/RestXmlSerdeDescriptorGeneratorTest.kt rename to codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/xml/RestXmlSerdeDescriptorGeneratorTest.kt index 7da286c7a8..bf3dfc1db2 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/aws/protocols/xml/RestXmlSerdeDescriptorGeneratorTest.kt +++ b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/protocols/xml/RestXmlSerdeDescriptorGeneratorTest.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.kotlin.codegen.aws.protocols.xml +package software.amazon.smithy.kotlin.codegen.protocols.xml import software.amazon.smithy.kotlin.codegen.test.* import software.amazon.smithy.model.shapes.ShapeId diff --git a/tests/codegen/nullability-tests/build.gradle.kts b/tests/codegen/nullability-tests/build.gradle.kts index c438a8d175..c79bbf47a2 100644 --- a/tests/codegen/nullability-tests/build.gradle.kts +++ b/tests/codegen/nullability-tests/build.gradle.kts @@ -64,6 +64,11 @@ dependencies { implementation(project(":runtime:protocol:http-client")) implementation(project(":runtime:observability:telemetry-api")) implementation(project(":runtime:observability:telemetry-defaults")) + implementation(project(":runtime:protocol:aws-json-protocols")) + implementation(project(":runtime:protocol:aws-protocol-core")) + implementation(project(":runtime:serde")) + implementation(project(":runtime:serde:serde-json")) + implementation(project(":runtime:protocol:http-client-engines:http-client-engine-default")) testImplementation(libs.kotlin.test.junit5) } diff --git a/tests/compile/src/test/kotlin/software/amazon/smithy/kotlin/codegen/SmithySdkTest.kt b/tests/compile/src/test/kotlin/software/amazon/smithy/kotlin/codegen/SmithySdkTest.kt index a062d6c941..9b6ab040ec 100644 --- a/tests/compile/src/test/kotlin/software/amazon/smithy/kotlin/codegen/SmithySdkTest.kt +++ b/tests/compile/src/test/kotlin/software/amazon/smithy/kotlin/codegen/SmithySdkTest.kt @@ -231,18 +231,19 @@ class SmithySdkTest { val model = """ namespace aws.sdk.kotlin.test - use aws.protocols#awsJson1_0 + use aws.protocols#restJson1 use smithy.rules#operationContextParams use smithy.rules#endpointRuleSet use aws.api#service - @awsJson1_0 + @restJson1 @service(sdkId: "UnionOperationTest") service TestService { operations: [UnionOperation], version: "1" } + @http(method: "POST", uri: "/union-operation") operation UnionOperation { input: UnionOperationRequest } @@ -270,18 +271,19 @@ class SmithySdkTest { val model = """ namespace aws.sdk.kotlin.test - use aws.protocols#awsJson1_0 + use aws.protocols#restJson1 use smithy.rules#operationContextParams use smithy.rules#endpointRuleSet use aws.api#service - @awsJson1_0 + @restJson1 @service(sdkId: "UnionOperationTest") service TestService { operations: [DeleteObjects], version: "1" } + @http(method: "POST", uri: "/delete-objects") operation DeleteObjects { input: DeleteObjectsRequest }