Skip to content

Commit

Permalink
Merge pull request #7 from zarbanio/fix/type-enum
Browse files Browse the repository at this point in the history
fix(oapi-type-enum): bug fixes
  • Loading branch information
arashalaei authored Dec 17, 2024
2 parents fc5371a + 55c28b8 commit 10db7bc
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="zarban",
version="0.5.4",
version="0.5.5",
author="Zarban",
author_email="[email protected]",
description="Python SDK for Zarban",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ def type(self, type):
"""
if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
allowed_values = ["PersonalSignRequest"] # noqa: E501
if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
raise ValueError(
"Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
.format(type, allowed_values)
)

self._type = type

Expand Down
35 changes: 34 additions & 1 deletion src/zarban/service/openapi_client/models/eip712_sign_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,65 @@ class EIP712SignRequest(object):
and the value is json key in definition.
"""
openapi_types = {
'type': 'str',
'name': 'str',
'typed_data': 'TypedData',
'hash': 'str'
}

attribute_map = {
'type': 'type',
'name': 'name',
'typed_data': 'typedData',
'hash': 'hash'
}

def __init__(self, name=None, typed_data=None, hash=None, local_vars_configuration=None): # noqa: E501
def __init__(self, type=None, name=None, typed_data=None, hash=None, local_vars_configuration=None): # noqa: E501
"""EIP712SignRequest - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration

self._type = None
self._name = None
self._typed_data = None
self._hash = None
self.discriminator = None

self.type = type
self.name = name
self.typed_data = typed_data
self.hash = hash

@property
def type(self):
"""Gets the type of this EIP712SignRequest. # noqa: E501
:return: The type of this EIP712SignRequest. # noqa: E501
:rtype: str
"""
return self._type

@type.setter
def type(self, type):
"""Sets the type of this EIP712SignRequest.
:param type: The type of this EIP712SignRequest. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
allowed_values = ["EIP712SignRequest"] # noqa: E501
if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
raise ValueError(
"Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
.format(type, allowed_values)
)

self._type = type

@property
def name(self):
"""Gets the name of this EIP712SignRequest. # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,57 @@ class PersonalSignRequest(object):
and the value is json key in definition.
"""
openapi_types = {
'type': 'str',
'message': 'str'
}

attribute_map = {
'type': 'type',
'message': 'message'
}

def __init__(self, message=None, local_vars_configuration=None): # noqa: E501
def __init__(self, type=None, message=None, local_vars_configuration=None): # noqa: E501
"""PersonalSignRequest - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration

self._type = None
self._message = None
self.discriminator = None

self.type = type
self.message = message

@property
def type(self):
"""Gets the type of this PersonalSignRequest. # noqa: E501
:return: The type of this PersonalSignRequest. # noqa: E501
:rtype: str
"""
return self._type

@type.setter
def type(self, type):
"""Sets the type of this PersonalSignRequest.
:param type: The type of this PersonalSignRequest. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
allowed_values = ["PersonalSignRequest"] # noqa: E501
if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
raise ValueError(
"Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
.format(type, allowed_values)
)

self._type = type

@property
def message(self):
"""Gets the message of this PersonalSignRequest. # noqa: E501
Expand Down
6 changes: 6 additions & 0 deletions src/zarban/service/openapi_client/models/prepared_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ def type(self, type):
"""
if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
allowed_values = ["PreparedTx"] # noqa: E501
if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501
raise ValueError(
"Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
.format(type, allowed_values)
)

self._type = type

Expand Down

0 comments on commit 10db7bc

Please sign in to comment.