Skip to content

Commit

Permalink
send opt-in query-compatible header where applicable (#2891)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucix-aws authored Nov 7, 2024
1 parent 5d0eb23 commit 1d989f3
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .changelog/ccc0add5b568413fb8cf09c94a4c7fa7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "ccc0add5-b568-413f-b8cf-09c94a4c7fa7",
"type": "feature",
"description": "Send opt-in query-compatible header for applicable services.",
"modules": [
"service/sqs"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ protected Set<StructureShape> generateErrorShapes(
}
}

@Override
protected void writeDefaultHeaders(GenerationContext context, OperationShape operation, GoWriter writer) {
super.writeDefaultHeaders(context, operation, writer);
if (isAwsQueryCompatibleTraitFound(context)) {
writer.write("httpBindingEncoder.SetHeader(\"X-Amzn-Query-Mode\").Boolean(true)");
}
}

@Override
protected void deserializeError(GenerationContext context, StructureShape shape) {
GoWriter writer = context.getWriter().get();
Expand Down
23 changes: 23 additions & 0 deletions service/sqs/serializers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1d989f3

Please sign in to comment.