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

send opt-in query-compatible header where applicable #2891

Merged
merged 1 commit into from
Nov 7, 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 .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.

Loading