Skip to content

Commit

Permalink
update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed Mar 8, 2024
1 parent 88e219f commit bf5c955
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class ObjProperty:
def __init__(self, input):
if hasattr(input, 'number'):
self._number = input.number
if hasattr(input, 'additionalProperties'):
self._additionalProperties = input.additionalProperties
if hasattr(input, 'additional_properties'):
self._additional_properties = input.additional_properties
@property
def number(self):
Expand All @@ -19,11 +19,11 @@ class ObjProperty:
self._number = number
@property
def additionalProperties(self):
return self._additionalProperties
@additionalProperties.setter
def additionalProperties(self, additionalProperties):
self._additionalProperties = additionalProperties
def additional_properties(self):
return self._additional_properties
@additional_properties.setter
def additional_properties(self, additional_properties):
self._additional_properties = additional_properties
",
]
`;
Expand All @@ -36,8 +36,8 @@ class ObjProperty:
def __init__(self, input):
if hasattr(input, 'number'):
self._number = input.number
if hasattr(input, 'additionalProperties'):
self._additionalProperties = input.additionalProperties
if hasattr(input, 'additional_properties'):
self._additional_properties = input.additional_properties
@property
def number(self):
Expand All @@ -47,11 +47,11 @@ class ObjProperty:
self._number = number
@property
def additionalProperties(self):
return self._additionalProperties
@additionalProperties.setter
def additionalProperties(self, additionalProperties):
self._additionalProperties = additionalProperties
def additional_properties(self):
return self._additional_properties
@additional_properties.setter
def additional_properties(self, additional_properties):
self._additional_properties = additional_properties
",
]
`;
Expand All @@ -64,8 +64,8 @@ class Root:
def __init__(self, input):
if hasattr(input, 'email'):
self._email = input.email
if hasattr(input, 'objProperty'):
self._objProperty = input.objProperty
if hasattr(input, 'obj_property'):
self._obj_property = input.obj_property
@property
def email(self):
Expand All @@ -75,11 +75,11 @@ class Root:
self._email = email
@property
def objProperty(self):
return self._objProperty
@objProperty.setter
def objProperty(self, objProperty):
self._objProperty = objProperty
def obj_property(self):
return self._obj_property
@obj_property.setter
def obj_property(self, obj_property):
self._obj_property = obj_property
",
]
`;
Expand All @@ -92,8 +92,8 @@ class Root:
def __init__(self, input):
if hasattr(input, 'email'):
self._email = input.email
if hasattr(input, 'objProperty'):
self._objProperty = input.objProperty
if hasattr(input, 'obj_property'):
self._obj_property = input.obj_property
@property
def email(self):
Expand All @@ -103,11 +103,11 @@ class Root:
self._email = email
@property
def objProperty(self):
return self._objProperty
@objProperty.setter
def objProperty(self, objProperty):
self._objProperty = objProperty
def obj_property(self):
return self._obj_property
@obj_property.setter
def obj_property(self, obj_property):
self._obj_property = obj_property
",
]
`;
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
exports[`Should be able to render python models and should log expected output to console: class-model 1`] = `
Array [
"class Root(BaseModel):
optionalField: Optional[str] = Field(description='''this field is optional''', default=None, serialization_alias='optionalField')
requiredField: str = Field(description='''this field is required''', serialization_alias='requiredField')
noDescription: Optional[str] = Field(default=None, serialization_alias='noDescription')
optional_field: Optional[str] = Field(description='''this field is optional''', default=None, serialization_alias='optionalField')
required_field: str = Field(description='''this field is required''', serialization_alias='requiredField')
no_description: Optional[str] = Field(default=None, serialization_alias='noDescription')
options: Optional[Options] = Field(default=None, serialization_alias='options')
",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Array [
def __init__(self, input):
if hasattr(input, 'email'):
self._email = input.email
if hasattr(input, 'additionalProperties'):
self._additionalProperties = input.additionalProperties
if hasattr(input, 'additional_properties'):
self._additional_properties = input.additional_properties
@property
def email(self):
Expand All @@ -17,17 +17,17 @@ Array [
self._email = email
@property
def additionalProperties(self):
return self._additionalProperties
@additionalProperties.setter
def additionalProperties(self, additionalProperties):
self._additionalProperties = additionalProperties
def additional_properties(self):
return self._additional_properties
@additional_properties.setter
def additional_properties(self, additional_properties):
self._additional_properties = additional_properties
def serializeToJson(self):
def serialize_to_json(self):
return json.dumps(self.__dict__, default=lambda o: o.__dict__, indent=2)
@staticmethod
def deserializeFromJson(json_string):
def deserialize_from_json(json_string):
return Root(**json.loads(json_string))
",
]
Expand Down

0 comments on commit bf5c955

Please sign in to comment.