@smithy/core 3.18.0 → 3.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -189,7 +189,7 @@ class HttpBindingProtocol extends HttpProtocol {
|
|
|
189
189
|
for (const [memberName, memberNs] of ns.structIterator()) {
|
|
190
190
|
const memberTraits = memberNs.getMergedTraits() ?? {};
|
|
191
191
|
const inputMemberValue = input[memberName];
|
|
192
|
-
if (inputMemberValue == null) {
|
|
192
|
+
if (inputMemberValue == null && !memberNs.isIdempotencyToken()) {
|
|
193
193
|
continue;
|
|
194
194
|
}
|
|
195
195
|
if (memberTraits.httpPayload) {
|
|
@@ -770,7 +770,12 @@ class ToStringShapeSerializer extends SerdeContext {
|
|
|
770
770
|
this.stringBuffer = value;
|
|
771
771
|
break;
|
|
772
772
|
default:
|
|
773
|
-
|
|
773
|
+
if (ns.isIdempotencyToken()) {
|
|
774
|
+
this.stringBuffer = serde.generateIdempotencyToken();
|
|
775
|
+
}
|
|
776
|
+
else {
|
|
777
|
+
this.stringBuffer = String(value);
|
|
778
|
+
}
|
|
774
779
|
}
|
|
775
780
|
}
|
|
776
781
|
flush() {
|
|
@@ -48,7 +48,7 @@ export class HttpBindingProtocol extends HttpProtocol {
|
|
|
48
48
|
for (const [memberName, memberNs] of ns.structIterator()) {
|
|
49
49
|
const memberTraits = memberNs.getMergedTraits() ?? {};
|
|
50
50
|
const inputMemberValue = input[memberName];
|
|
51
|
-
if (inputMemberValue == null) {
|
|
51
|
+
if (inputMemberValue == null && !memberNs.isIdempotencyToken()) {
|
|
52
52
|
continue;
|
|
53
53
|
}
|
|
54
54
|
if (memberTraits.httpPayload) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NormalizedSchema } from "@smithy/core/schema";
|
|
2
|
-
import { dateToUtcString, LazyJsonString, quoteHeader } from "@smithy/core/serde";
|
|
2
|
+
import { dateToUtcString, generateIdempotencyToken, LazyJsonString, quoteHeader } from "@smithy/core/serde";
|
|
3
3
|
import { toBase64 } from "@smithy/util-base64";
|
|
4
4
|
import { SerdeContext } from "../SerdeContext";
|
|
5
5
|
import { determineTimestampFormat } from "./determineTimestampFormat";
|
|
@@ -75,7 +75,12 @@ export class ToStringShapeSerializer extends SerdeContext {
|
|
|
75
75
|
this.stringBuffer = value;
|
|
76
76
|
break;
|
|
77
77
|
default:
|
|
78
|
-
|
|
78
|
+
if (ns.isIdempotencyToken()) {
|
|
79
|
+
this.stringBuffer = generateIdempotencyToken();
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
this.stringBuffer = String(value);
|
|
83
|
+
}
|
|
79
84
|
}
|
|
80
85
|
}
|
|
81
86
|
flush() {
|
package/package.json
CHANGED