Skip to content

Commit a990db7

Browse files
authored
fix(clients): trim values in parsed xml only if result is empty (#2194)
1 parent 325d6b4 commit a990db7

File tree

27 files changed

+55
-28
lines changed

27 files changed

+55
-28
lines changed

clients/client-auto-scaling/protocols/Aws_query.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8908,7 +8908,8 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
89088908
attributeNamePrefix: "",
89098909
ignoreAttributes: false,
89108910
parseNodeValue: false,
8911-
tagValueProcessor: (val, tagName) => decodeEscapedXML(val),
8911+
trimValues: false,
8912+
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeEscapedXML(val)),
89128913
});
89138914
const textNodeName = "#text";
89148915
const key = Object.keys(parsedObj)[0];

clients/client-cloudformation/protocols/Aws_query.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9598,7 +9598,8 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
95989598
attributeNamePrefix: "",
95999599
ignoreAttributes: false,
96009600
parseNodeValue: false,
9601-
tagValueProcessor: (val, tagName) => decodeEscapedXML(val),
9601+
trimValues: false,
9602+
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeEscapedXML(val)),
96029603
});
96039604
const textNodeName = "#text";
96049605
const key = Object.keys(parsedObj)[0];

clients/client-cloudfront/protocols/Aws_restXml.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17052,7 +17052,8 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
1705217052
attributeNamePrefix: "",
1705317053
ignoreAttributes: false,
1705417054
parseNodeValue: false,
17055-
tagValueProcessor: (val, tagName) => decodeEscapedXML(val),
17055+
trimValues: false,
17056+
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeEscapedXML(val)),
1705617057
});
1705717058
const textNodeName = "#text";
1705817059
const key = Object.keys(parsedObj)[0];

clients/client-cloudsearch/protocols/Aws_query.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4875,7 +4875,8 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
48754875
attributeNamePrefix: "",
48764876
ignoreAttributes: false,
48774877
parseNodeValue: false,
4878-
tagValueProcessor: (val, tagName) => decodeEscapedXML(val),
4878+
trimValues: false,
4879+
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeEscapedXML(val)),
48794880
});
48804881
const textNodeName = "#text";
48814882
const key = Object.keys(parsedObj)[0];

clients/client-cloudwatch/protocols/Aws_query.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5473,7 +5473,8 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
54735473
attributeNamePrefix: "",
54745474
ignoreAttributes: false,
54755475
parseNodeValue: false,
5476-
tagValueProcessor: (val, tagName) => decodeEscapedXML(val),
5476+
trimValues: false,
5477+
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeEscapedXML(val)),
54775478
});
54785479
const textNodeName = "#text";
54795480
const key = Object.keys(parsedObj)[0];

clients/client-docdb/protocols/Aws_query.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8712,7 +8712,8 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
87128712
attributeNamePrefix: "",
87138713
ignoreAttributes: false,
87148714
parseNodeValue: false,
8715-
tagValueProcessor: (val, tagName) => decodeEscapedXML(val),
8715+
trimValues: false,
8716+
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeEscapedXML(val)),
87168717
});
87178718
const textNodeName = "#text";
87188719
const key = Object.keys(parsedObj)[0];

clients/client-ec2/protocols/Aws_ec2.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70099,7 +70099,8 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
7009970099
attributeNamePrefix: "",
7010070100
ignoreAttributes: false,
7010170101
parseNodeValue: false,
70102-
tagValueProcessor: (val, tagName) => decodeEscapedXML(val),
70102+
trimValues: false,
70103+
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeEscapedXML(val)),
7010370104
});
7010470105
const textNodeName = "#text";
7010570106
const key = Object.keys(parsedObj)[0];

clients/client-elastic-beanstalk/protocols/Aws_query.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8209,7 +8209,8 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
82098209
attributeNamePrefix: "",
82108210
ignoreAttributes: false,
82118211
parseNodeValue: false,
8212-
tagValueProcessor: (val, tagName) => decodeEscapedXML(val),
8212+
trimValues: false,
8213+
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeEscapedXML(val)),
82138214
});
82148215
const textNodeName = "#text";
82158216
const key = Object.keys(parsedObj)[0];

clients/client-elastic-load-balancing-v2/protocols/Aws_query.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7865,7 +7865,8 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
78657865
attributeNamePrefix: "",
78667866
ignoreAttributes: false,
78677867
parseNodeValue: false,
7868-
tagValueProcessor: (val, tagName) => decodeEscapedXML(val),
7868+
trimValues: false,
7869+
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeEscapedXML(val)),
78697870
});
78707871
const textNodeName = "#text";
78717872
const key = Object.keys(parsedObj)[0];

clients/client-elastic-load-balancing/protocols/Aws_query.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5414,7 +5414,8 @@ const parseBody = (streamBody: any, context: __SerdeContext): any =>
54145414
attributeNamePrefix: "",
54155415
ignoreAttributes: false,
54165416
parseNodeValue: false,
5417-
tagValueProcessor: (val, tagName) => decodeEscapedXML(val),
5417+
trimValues: false,
5418+
tagValueProcessor: (val, tagName) => (val.trim() === "" ? "" : decodeEscapedXML(val)),
54185419
});
54195420
const textNodeName = "#text";
54205421
const key = Object.keys(parsedObj)[0];

0 commit comments

Comments
 (0)