@autorest/python 6.35.3 → 6.35.4

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.
@@ -87,11 +87,17 @@ class Property(BaseModel): # pylint: disable=too-many-instance-attributes
87
87
  def is_enum_discriminator(self) -> bool:
88
88
  return self.is_discriminator and self.type.type == "enum"
89
89
 
90
+ @property
91
+ def is_combined_discriminator(self) -> bool:
92
+ return self.is_discriminator and self.type.type == "combined"
93
+
90
94
  @property
91
95
  def is_base_discriminator(self) -> bool:
92
96
  """If this discriminator is on the base model for polymorphic inheritance"""
93
97
  if self.is_enum_discriminator:
94
98
  return self.is_polymorphic and self.client_default_value is None
99
+ if self.is_combined_discriminator:
100
+ return True
95
101
  return self.is_discriminator and self.is_polymorphic and cast(ConstantType, self.type).value is None
96
102
 
97
103
  @property
@@ -87,11 +87,17 @@ class Property(BaseModel): # pylint: disable=too-many-instance-attributes
87
87
  def is_enum_discriminator(self) -> bool:
88
88
  return self.is_discriminator and self.type.type == "enum"
89
89
 
90
+ @property
91
+ def is_combined_discriminator(self) -> bool:
92
+ return self.is_discriminator and self.type.type == "combined"
93
+
90
94
  @property
91
95
  def is_base_discriminator(self) -> bool:
92
96
  """If this discriminator is on the base model for polymorphic inheritance"""
93
97
  if self.is_enum_discriminator:
94
98
  return self.is_polymorphic and self.client_default_value is None
99
+ if self.is_combined_discriminator:
100
+ return True
95
101
  return self.is_discriminator and self.is_polymorphic and cast(ConstantType, self.type).value is None
96
102
 
97
103
  @property
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autorest/python",
3
- "version": "6.35.3",
3
+ "version": "6.35.4",
4
4
  "description": "The Python extension for generators in AutoRest.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "homepage": "https://github.com/Azure/autorest.python/blob/main/README.md",
21
21
  "dependencies": {
22
- "@typespec/http-client-python": "~0.12.3",
22
+ "@typespec/http-client-python": "~0.12.4",
23
23
  "@autorest/system-requirements": "~1.0.2",
24
24
  "fs-extra": "~11.2.0",
25
25
  "tsx": "~4.19.1"