Skip to content

Commit 18d4b6d

Browse files
committed
Merge remote-tracking branch 'origin/sherz/enable-additional-properties' into datadog-api-spec/test/bruce.tu/DBNBK-116-Extend-Widget.TIME-schema
merge checks
2 parents fb2c065 + 488630b commit 18d4b6d

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

.generator/src/generator/templates/model_utils.j2

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -393,16 +393,6 @@ class ModelNormal(OpenApiModel):
393393
def __init__(self, kwargs):
394394
super().__init__(kwargs)
395395
for var_name, var_value in kwargs.items():
396-
if (
397-
var_name not in self.attribute_map
398-
and self._configuration is not None
399-
and self._configuration.discard_unknown_keys
400-
and self.additional_properties_type is not None
401-
):
402-
if self._spec_property_naming:
403-
# If it's returned from the API, store it if we need to send it back
404-
self.__dict__["_data_store"][var_name] = var_value
405-
continue
406396
setattr(self, var_name, var_value)
407397
if not self._spec_property_naming and var_name in self.read_only_vars:
408398
raise ApiAttributeError(f"`{var_name}` is a read-only attribute.")

src/datadog_api_client/model_utils.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -406,16 +406,6 @@ def __eq__(self, other):
406406
def __init__(self, kwargs):
407407
super().__init__(kwargs)
408408
for var_name, var_value in kwargs.items():
409-
if (
410-
var_name not in self.attribute_map
411-
and self._configuration is not None
412-
and self._configuration.discard_unknown_keys
413-
and self.additional_properties_type is not None
414-
):
415-
if self._spec_property_naming:
416-
# If it's returned from the API, store it if we need to send it back
417-
self.__dict__["_data_store"][var_name] = var_value
418-
continue
419409
setattr(self, var_name, var_value)
420410
if not self._spec_property_naming and var_name in self.read_only_vars:
421411
raise ApiAttributeError(f"`{var_name}` is a read-only attribute.")

0 commit comments

Comments
 (0)