Skip to content

Commit 97e2799

Browse files
trivikrsrchase
authored andcommitted
Revert validate required input query params
This reverts commit 959146f.
1 parent 077aab7 commit 97e2799

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/HttpBindingProtocolGenerator.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -856,21 +856,17 @@ private void writeRequestQueryParam(
856856
target
857857
);
858858

859-
boolean isRequired = binding.getMember().isRequired();
860-
writer.addImport("expectNonNull", "__expectNonNull", "@aws-sdk/smithy-client");
861-
String value = isRequired ? "__expectNonNull($L, `" + memberName + "`)" : "$L";
862-
863859
if (Objects.equals("input." + memberName + "!", queryValue)) {
864860
// simple undefined check
865861
writer.write(
866-
"$S: [," + value + "],",
862+
"$S: [,$L],",
867863
binding.getLocationName(),
868864
queryValue
869865
);
870866
} else {
871867
// undefined check with lazy eval
872868
writer.write(
873-
"$S: [() => input.$L !== void 0, () => " + value + "],",
869+
"$S: [() => input.$L !== void 0, () => $L],",
874870
binding.getLocationName(),
875871
memberName,
876872
queryValue

0 commit comments

Comments
 (0)