File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
.generator/src/generator/templates Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -554,6 +554,10 @@ class ModelComposed(OpenApiModel):
554554 """Returns the string representation of the model"""
555555 return pprint.pformat(self.to_dict())
556556
557+ def get_oneof_instance(self):
558+ """Returns the oneOf instance"""
559+ return self._composed_instances[0]
560+
557561 def __eq__(self, other):
558562 """Returns true if both objects are equal"""
559563 if not isinstance(other, self.__class__):
Original file line number Diff line number Diff line change @@ -557,6 +557,10 @@ def to_str(self):
557557 """Returns the string representation of the model"""
558558 return pprint .pformat (self .to_dict ())
559559
560+ def get_oneof_instance (self ):
561+ """Returns the oneOf instance"""
562+ return self ._composed_instances [0 ]
563+
560564 def __eq__ (self , other ):
561565 """Returns true if both objects are equal"""
562566 if not isinstance (other , self .__class__ ):
You can’t perform that action at this time.
0 commit comments