Skip to content

Commit

Permalink
Automated update by SDK Generator (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklloyd authored Jul 22, 2024
1 parent 5f3ec7f commit d030ed9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/apideck/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ class OpenApiModel(object):

def set_attribute(self, name, value):
# this is only used to set properties on self
# something here

path_to_item = []
if self._path_to_item:
Expand All @@ -130,11 +131,14 @@ def set_attribute(self, name, value):
if name in self.openapi_types:
required_types_mixed = self.openapi_types[name]
elif self.additional_properties_type is None:
raise ApiAttributeError(
"{0} has no attribute '{1}'".format(
type(self).__name__, name),
path_to_item
)
# This is a custom implementation to handle the case where the attribute is not defined in the model
return

# raise ApiAttributeError(
# "{0} has no attribute '{1}'".format(
# type(self).__name__, name),
# path_to_item
# )
elif self.additional_properties_type is not None:
required_types_mixed = self.additional_properties_type

Expand Down Expand Up @@ -171,6 +175,7 @@ def set_attribute(self, name, value):
)
self.__dict__['_data_store'][name] = value


def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
Expand Down

0 comments on commit d030ed9

Please sign in to comment.