Skip to content

Commit 19f9ec6

Browse files
authored
refactor: migrate AWS protocol support to smithy-kotlin (#1254)
1 parent 0462019 commit 19f9ec6

33 files changed

+8
-2821
lines changed

aws-runtime/aws-core/common/src/aws/sdk/kotlin/runtime/client/AwsClientOption.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ import aws.smithy.kotlin.runtime.collections.AttributeKey
1414
public object AwsClientOption {
1515
/**
1616
* The AWS region the client should use. Note this is not always the same as [AwsSigningAttributes.SigningRegion] in
17-
* the case of global services like IAM
17+
* the case of global services like IAM.
18+
*
19+
* NOTE: Synonymous with [aws.smithy.kotlin.runtime.awsprotocol.AwsAttributes.Region]
1820
*/
19-
public val Region: AttributeKey<String> = AttributeKey("aws.sdk.kotlin#AwsRegion")
21+
public val Region: AttributeKey<String> = AttributeKey("aws.smithy.kotlin#AwsRegion")
2022

2123
/**
2224
* The ID of the AWS account requests are routed to.

codegen/aws-sdk-codegen/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ group = "aws.sdk.kotlin"
2020
version = sdkVersion
2121

2222
dependencies {
23-
24-
api(project(":codegen:smithy-aws-kotlin-codegen"))
2523
implementation(libs.kotlin.stdlib.jdk8)
2624
api(libs.smithy.kotlin.codegen)
25+
api(libs.smithy.aws.kotlin.codegen)
2726

2827
api(libs.smithy.aws.traits)
2928
api(libs.smithy.aws.iam.traits)

codegen/protocol-tests/build.gradle.kts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,15 @@ data class ProtocolTest(val projectionName: String, val serviceShapeId: String,
2121
// The following section exposes Smithy protocol test suites as gradle test targets
2222
// for the configured protocols in [enabledProtocols].
2323
val enabledProtocols = listOf(
24-
ProtocolTest("aws-ec2-query", "aws.protocoltests.ec2#AwsEc2"),
25-
ProtocolTest("aws-json-10", "aws.protocoltests.json10#JsonRpc10"),
26-
ProtocolTest("aws-json-11", "aws.protocoltests.json#JsonProtocol"),
27-
ProtocolTest("aws-restjson", "aws.protocoltests.restjson#RestJson"),
28-
ProtocolTest("aws-restxml", "aws.protocoltests.restxml#RestXml"),
29-
ProtocolTest("aws-restxml-xmlns", "aws.protocoltests.restxml.xmlns#RestXmlWithNamespace"),
30-
ProtocolTest("aws-query", "aws.protocoltests.query#AwsQuery"),
31-
3224
// service specific tests
3325
ProtocolTest("apigateway", "com.amazonaws.apigateway#BackplaneControlService"),
3426
ProtocolTest("glacier", "com.amazonaws.glacier#Glacier"),
3527
ProtocolTest("machinelearning", "com.amazonaws.machinelearning#AmazonML_20141212", sdkId = "Machine Learning"),
36-
37-
// Custom hand written tests
38-
ProtocolTest("error-correction-json", "aws.protocoltests.errorcorrection#RequiredValueJson"),
39-
ProtocolTest("error-correction-xml", "aws.protocoltests.errorcorrection#RequiredValueXml"),
4028
)
4129

4230
smithyBuild {
4331
enabledProtocols.forEach { test ->
4432
projections.register(test.projectionName) {
45-
imports = listOf(file("model").absolutePath)
46-
4733
transforms = listOf(
4834
"""
4935
{

codegen/protocol-tests/model/error-correction-tests.smithy

Lines changed: 0 additions & 156 deletions
This file was deleted.

codegen/smithy-aws-kotlin-codegen/build.gradle.kts

Lines changed: 0 additions & 98 deletions
This file was deleted.

codegen/smithy-aws-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/aws/SdkProtocolGeneratorSupplier.kt

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)