Skip to content

Commit fc635cf

Browse files
committed
Changes after merge
1 parent 13221b8 commit fc635cf

File tree

2 files changed

+5
-2
lines changed
  • codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/protocols

2 files changed

+5
-2
lines changed

codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/protocols/AwsJson.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ class AwsJsonHttpBindingResolver(
7979

8080
override fun errorResponseBindings(errorShape: ToShapeId): List<HttpBindingDescriptor> = bindings(errorShape)
8181

82-
// TODO This won't set the correct `Content-Type` for event streaming operations!
8382
override fun requestContentType(operationShape: OperationShape): String =
8483
"application/x-amz-json-${awsJsonVersion.value}"
8584

codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/protocols/RpcV2.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package software.amazon.smithy.rust.codegen.core.smithy.protocols
77

88
import software.amazon.smithy.codegen.core.CodegenException
99
import software.amazon.smithy.model.Model
10+
import software.amazon.smithy.model.shapes.MemberShape
1011
import software.amazon.smithy.model.shapes.OperationShape
1112
import software.amazon.smithy.model.shapes.ToShapeId
1213
import software.amazon.smithy.model.traits.TimestampFormatTrait
@@ -25,7 +26,7 @@ import software.amazon.smithy.rust.codegen.core.util.expectTrait
2526
import software.amazon.smithy.rust.codegen.core.util.isStreaming
2627
import software.amazon.smithy.rust.codegen.core.util.outputShape
2728

28-
29+
// TODO Rename these to RpcV2Cbor
2930
class RpcV2HttpBindingResolver(
3031
private val model: Model,
3132
) : HttpBindingResolver {
@@ -75,6 +76,9 @@ class RpcV2HttpBindingResolver(
7576
}
7677
return requestContentType(operationShape)
7778
}
79+
80+
override fun eventStreamMessageContentType(memberShape: MemberShape): String? =
81+
ProtocolContentTypes.eventStreamMemberContentType(model, memberShape, "application/cbor")
7882
}
7983

8084
/**

0 commit comments

Comments
 (0)