@typespec/http-client-python 0.3.0 → 0.3.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.
@@ -506,7 +506,6 @@ class Model(object):
506
506
  def _classify(cls, response, objects):
507
507
  """Check the class _subtype_map for any child classes.
508
508
  We want to ignore any inherited _subtype_maps.
509
- Remove the polymorphic key from the initial data.
510
509
 
511
510
  :param dict response: The initial data
512
511
  :param dict objects: The class objects
@@ -518,7 +517,7 @@ class Model(object):
518
517
 
519
518
  if not isinstance(response, ET.Element):
520
519
  rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1]
521
- subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None)
520
+ subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None)
522
521
  else:
523
522
  subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response)
524
523
  if subtype_value:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typespec/http-client-python",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec emitter for Python SDKs",
6
6
  "homepage": "https://typespec.io",