Skip to content

Commit 9f6cad7

Browse files
committed
feat(codegen): add Smithy RPCv2 CBOR protocol as an option
1 parent ed000cc commit 9f6cad7

File tree

12 files changed

+1084
-2038
lines changed

12 files changed

+1084
-2038
lines changed

codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddProtocols.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,20 @@
2828
@SmithyInternalApi
2929
public class AddProtocols implements TypeScriptIntegration {
3030

31+
/**
32+
* This order differs from the base protocol selection specification
33+
* in that for JavaScript runtimes, JSON-based protocols have higher default priority than CBOR-based.
34+
* This behavior may be fine-tuned at the service level in a case-by-case basis.
35+
*
36+
* @return a list of ProtocolGenerators in the default priority order, highest first.
37+
*/
3138
@Override
3239
public List<ProtocolGenerator> getProtocolGenerators() {
3340
return ListUtils.of(
34-
new SmithyRpcV2Cbor(),
3541
new AwsJsonRpc1_0(),
3642
new AwsJsonRpc1_1(),
3743
new AwsRestJson1(),
44+
new SmithyRpcV2Cbor(),
3845
new AwsRestXml(),
3946
new AwsQuery(),
4047
new AwsEc2()

private/aws-protocoltests-ec2/test/functional/ec2query.spec.ts

Lines changed: 87 additions & 111 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)