Skip to content
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

feat: add support for smithy.protocols#rpcv2Cbor protocol #1336

Merged
merged 16 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changes/41bdd91a-a58d-47bc-b89d-0e5c334ea6f6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "41bdd91a-a58d-47bc-b89d-0e5c334ea6f6",
"type": "feature",
"description": "Add support for `smithy.protocols#rpcv2Cbor` protocol",
"issues": [
"https://github.com/awslabs/aws-sdk-kotlin/issues/1302"
]
}
1 change: 1 addition & 0 deletions build-support/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependencies {

implementation(libs.smithy.model)
implementation(libs.smithy.aws.traits)
implementation(libs.smithy.protocol.traits)
implementation(libs.kotlinx.serialization.json)

testImplementation(libs.junit.jupiter)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import software.amazon.smithy.aws.traits.protocols.Ec2QueryTrait
import software.amazon.smithy.aws.traits.protocols.RestJson1Trait
import software.amazon.smithy.aws.traits.protocols.RestXmlTrait
import software.amazon.smithy.model.shapes.ServiceShape
import software.amazon.smithy.protocol.traits.Rpcv2CborTrait

private const val DEPRECATED_SHAPES_CUTOFF_DATE: String = "2023-11-28"

Expand Down Expand Up @@ -39,4 +40,5 @@ fun ServiceShape.protocolName(): String =
AwsJson1_1Trait.ID,
AwsQueryTrait.ID,
Ec2QueryTrait.ID,
Rpcv2CborTrait.ID,
).first { hasTrait(it) }.name
6 changes: 4 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ coroutines-version = "1.7.3"
atomicfu-version = "0.23.1"

# smithy-kotlin codegen and runtime are versioned separately
smithy-kotlin-runtime-version = "1.2.12"
smithy-kotlin-codegen-version = "0.32.12"
smithy-kotlin-runtime-version = "1.2.14"
smithy-kotlin-codegen-version = "0.32.14"

# codegen
smithy-version = "1.50.0"
Expand Down Expand Up @@ -71,6 +71,7 @@ smithy-kotlin-serde = { module = "aws.smithy.kotlin:serde", version.ref = "smith
smithy-kotlin-serde-form-url = { module = "aws.smithy.kotlin:serde-form-url", version.ref = "smithy-kotlin-runtime-version" }
smithy-kotlin-serde-json = { module = "aws.smithy.kotlin:serde-json", version.ref = "smithy-kotlin-runtime-version" }
smithy-kotlin-serde-xml = { module = "aws.smithy.kotlin:serde-xml", version.ref = "smithy-kotlin-runtime-version" }
smithy-kotlin-serde-cbor = { module = "aws.smithy.kotlin:serde-cbor", version.ref = "smithy-kotlin-runtime-version" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: I don't see this used anywhere, is it necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it's not used anywhere, neither is serde-formurl, serde-json, serde-xml. I believe these are all here so that we publish them in our version catalog for ease of consumption for downstream users.

smithy-kotlin-smithy-client = { module = "aws.smithy.kotlin:smithy-client", version.ref = "smithy-kotlin-runtime-version" }
smithy-kotlin-smithy-test = { module = "aws.smithy.kotlin:smithy-test", version.ref = "smithy-kotlin-runtime-version" }
smithy-kotlin-telemetry-api = { module = "aws.smithy.kotlin:telemetry-api", version.ref = "smithy-kotlin-runtime-version" }
Expand All @@ -88,6 +89,7 @@ smithy-cli = { module = "software.amazon.smithy:smithy-cli", version.ref = "smit
smithy-waiters = { module = "software.amazon.smithy:smithy-waiters", version.ref = "smithy-version" }
smithy-aws-endpoints = { module = "software.amazon.smithy:smithy-aws-endpoints", version.ref = "smithy-version" }
smithy-aws-traits = { module = "software.amazon.smithy:smithy-aws-traits", version.ref = "smithy-version" }
smithy-protocol-traits = { module = "software.amazon.smithy:smithy-protocol-traits", version.ref = "smithy-version" }
smithy-aws-protocol-tests = { module = "software.amazon.smithy:smithy-aws-protocol-tests", version.ref = "smithy-version" }
smithy-aws-iam-traits = { module = "software.amazon.smithy:smithy-aws-iam-traits", version.ref = "smithy-version" }
smithy-aws-cloudformation-traits = { module = "software.amazon.smithy:smithy-aws-cloudformation-traits", version.ref = "smithy-version" }
Expand Down
Loading