@aws-sdk/core 3.845.0 → 3.855.0
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.
|
@@ -787,9 +787,8 @@ var XmlShapeDeserializer = class extends SerdeContextConfig {
|
|
|
787
787
|
readSchema(_schema, value) {
|
|
788
788
|
const ns = import_schema5.NormalizedSchema.of(_schema);
|
|
789
789
|
const traits = ns.getMergedTraits();
|
|
790
|
-
const schema = ns.getSchema();
|
|
791
790
|
if (ns.isListSchema() && !Array.isArray(value)) {
|
|
792
|
-
return this.readSchema(
|
|
791
|
+
return this.readSchema(ns, [value]);
|
|
793
792
|
}
|
|
794
793
|
if (value == null) {
|
|
795
794
|
return value;
|
|
@@ -845,14 +844,14 @@ var XmlShapeDeserializer = class extends SerdeContextConfig {
|
|
|
845
844
|
return value;
|
|
846
845
|
}
|
|
847
846
|
throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`);
|
|
848
|
-
} else {
|
|
849
|
-
if (ns.isListSchema()) {
|
|
850
|
-
return [];
|
|
851
|
-
} else if (ns.isMapSchema() || ns.isStructSchema()) {
|
|
852
|
-
return {};
|
|
853
|
-
}
|
|
854
|
-
return this.stringDeserializer.read(ns, value);
|
|
855
847
|
}
|
|
848
|
+
if (ns.isListSchema()) {
|
|
849
|
+
return [];
|
|
850
|
+
}
|
|
851
|
+
if (ns.isMapSchema() || ns.isStructSchema()) {
|
|
852
|
+
return {};
|
|
853
|
+
}
|
|
854
|
+
return this.stringDeserializer.read(ns, value);
|
|
856
855
|
}
|
|
857
856
|
parseXml(xml) {
|
|
858
857
|
if (xml.length) {
|
|
@@ -43,9 +43,8 @@ export class XmlShapeDeserializer extends SerdeContextConfig {
|
|
|
43
43
|
readSchema(_schema, value) {
|
|
44
44
|
const ns = NormalizedSchema.of(_schema);
|
|
45
45
|
const traits = ns.getMergedTraits();
|
|
46
|
-
const schema = ns.getSchema();
|
|
47
46
|
if (ns.isListSchema() && !Array.isArray(value)) {
|
|
48
|
-
return this.readSchema(
|
|
47
|
+
return this.readSchema(ns, [value]);
|
|
49
48
|
}
|
|
50
49
|
if (value == null) {
|
|
51
50
|
return value;
|
|
@@ -105,15 +104,13 @@ export class XmlShapeDeserializer extends SerdeContextConfig {
|
|
|
105
104
|
}
|
|
106
105
|
throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`);
|
|
107
106
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
return {};
|
|
114
|
-
}
|
|
115
|
-
return this.stringDeserializer.read(ns, value);
|
|
107
|
+
if (ns.isListSchema()) {
|
|
108
|
+
return [];
|
|
109
|
+
}
|
|
110
|
+
if (ns.isMapSchema() || ns.isStructSchema()) {
|
|
111
|
+
return {};
|
|
116
112
|
}
|
|
113
|
+
return this.stringDeserializer.read(ns, value);
|
|
117
114
|
}
|
|
118
115
|
parseXml(xml) {
|
|
119
116
|
if (xml.length) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Schema, SerdeFunctions, ShapeDeserializer } from "@smithy/types";
|
|
1
|
+
import type { Schema, SerdeFunctions, ShapeDeserializer } from "@smithy/types";
|
|
2
2
|
import { SerdeContextConfig } from "../ConfigurableSerdeContext";
|
|
3
|
-
import { XmlSettings } from "./XmlCodec";
|
|
3
|
+
import type { XmlSettings } from "./XmlCodec";
|
|
4
4
|
/**
|
|
5
5
|
* @alpha
|
|
6
6
|
*/
|
package/package.json
CHANGED