Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@dataclasses.dataclass
class UserPathSchema(object):
"""A docstring to prevent auto generated docstring"""
id: int = number_field(minimum=1, cast_on_load=True)
@dataclasses.dataclass
class UserSchema(object):
"""A docstring to prevent auto generated docstring"""
first_name: str
last_name: str
display_name: str
company: str
username: str = string_field(pattern='[\w-]+')
email_address: str = string_field(format_=StringFormat.EMAIL)
id: typing.Optional[int] = None # Note: must be optional to be unused in POST user
@dataclasses.dataclass
class PaginationSchema(object):
"""A docstring to prevent auto generated docstring"""
first_id: int
last_id: int
current_id: int
@dataclasses.dataclass
class ListsUserSchema(object):
"""A docstring to prevent auto generated docstring"""
pagination: PaginationSchema
item_nb: int = number_field(minimum=0)
1 and 999
"""
id: int = number_field(minimum=1, cast_on_load=True)
@dataclasses.dataclass
class UserSchema(object):
"""Complete representation of a user"""
first_name: str
last_name: typing.Optional[str]
display_name: str
company: typing.Optional[str]
id: int
email_address: str = string_field(format_=StringFormat.EMAIL)
@dataclasses.dataclass
class UserDigestSchema(object):
"""User representation for listing"""
id: int
display_name: str = ""
@dataclasses.dataclass
class UserAvatarSchema(object):
"""Avatar (image file) of user"""
avatar: typing.Any
@dataclasses.dataclass
class UserPathSchema(object):
"""A docstring to prevent auto generated docstring"""
id: int = number_field(minimum=1, cast_on_load=True)
@dataclasses.dataclass
class UserSchema(object):
"""A docstring to prevent auto generated docstring"""
first_name: str
last_name: str
display_name: str
company: str
username: str = string_field(pattern='[\w-]+')
email_address: str = string_field(format_=StringFormat.EMAIL)
id: typing.Optional[int] = None # Note: must be optional to be unused in POST user
@dataclasses.dataclass
class PaginationSchema(object):
"""A docstring to prevent auto generated docstring"""
first_id: int
last_id: int
current_id: int
@dataclasses.dataclass
class ListsUserSchema(object):
"""A docstring to prevent auto generated docstring"""
pagination: PaginationSchema