@azure/synapse-monitoring 1.0.0-alpha.20230106.1 → 1.0.0-alpha.20230110.1

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.
package/dist/index.js CHANGED
@@ -398,13 +398,14 @@ class SerializerImpl {
398
398
  * @returns A valid deserialized Javascript object
399
399
  */
400
400
  deserialize(mapper, responseBody, objectName, options = { xml: {} }) {
401
- var _a, _b, _c;
401
+ var _a, _b, _c, _d;
402
402
  const updatedOptions = {
403
403
  xml: {
404
404
  rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "",
405
405
  includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false,
406
406
  xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY,
407
407
  },
408
+ ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false,
408
409
  };
409
410
  if (responseBody === undefined || responseBody === null) {
410
411
  if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) {
@@ -1024,7 +1025,7 @@ function deserializeCompositeType(serializer, mapper, responseBody, objectName,
1024
1025
  }
1025
1026
  }
1026
1027
  }
1027
- else if (responseBody) {
1028
+ else if (responseBody && !options.ignoreUnknownProperties) {
1028
1029
  for (const key of Object.keys(responseBody)) {
1029
1030
  if (instance[key] === undefined &&
1030
1031
  !handledPropertyNames.includes(key) &&
@@ -18589,7 +18590,7 @@ async function deserializeResponseBody(jsonContentTypes, xmlContentTypes, respon
18589
18590
  parsedResponse.parsedBody = response.status >= 200 && response.status < 300;
18590
18591
  }
18591
18592
  if (responseSpec.headersMapper) {
18592
- parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders");
18593
+ parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders", { xml: {}, ignoreUnknownProperties: true });
18593
18594
  }
18594
18595
  }
18595
18596
  return parsedResponse;