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

serialize empty strings and lists to headers in restXml and restJson1 #2403

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions smithy-aws-protocol-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ smithy {
format.set(false)
smithyBuildConfigs.set(project.files())
}

sourceSets.main.java.srcDirs = ['model', 'src/main/smithy']
kuhe marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,15 @@ operation NullAndEmptyHeadersClient {
apply NullAndEmptyHeadersClient @httpRequestTests([
{
id: "RestJsonNullAndEmptyHeaders",
documentation: "Do not send null values, empty strings, or empty lists over the wire in headers",
documentation: "Do not send null values, but do send empty strings and empty lists over the wire in headers",
protocol: restJson1,
method: "GET",
uri: "/NullAndEmptyHeadersClient",
forbidHeaders: ["X-A", "X-B", "X-C"],
forbidHeaders: ["X-A"],
headers: {
"X-B": ""
"X-C": ""
}
body: "",
params: {
a: null,
Expand Down
8 changes: 6 additions & 2 deletions smithy-aws-protocol-tests/model/restXml/http-headers.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,15 @@ operation NullAndEmptyHeadersClient {
apply NullAndEmptyHeadersClient @httpRequestTests([
{
id: "NullAndEmptyHeaders",
documentation: "Do not send null values, empty strings, or empty lists over the wire in headers",
documentation: "Do not send null values, but do send empty strings and empty lists over the wire in headers",
protocol: restXml,
method: "GET",
uri: "/NullAndEmptyHeadersClient",
forbidHeaders: ["X-A", "X-B", "X-C"],
forbidHeaders: ["X-A"],
headers: {
"X-B": ""
"X-C": ""
}
body: "",
params: {
a: null,
Expand Down
Loading