code format

This commit is contained in:
Jakub Miazek
2024-04-24 10:37:08 +02:00
parent 43fe665608
commit c2975fd260
19 changed files with 358 additions and 173 deletions

View File

@@ -8,10 +8,20 @@ config = ConfigDict(from_attributes=True)
# TODO: add pydantic field validator for strong password
class UserSchema(BaseModel):
model_config = config
email: EmailStr = Field(title="Users email", description="Users email", examples=["john@domain.com"])
first_name: str = Field(title="Users first name", description="Users first name", examples=["John"])
last_name: str = Field(title="Users last name", description="Users last name", examples=["Doe"])
password: SecretStr = Field(title="Users password", description="Users password", examples=["@SuperSecret123"])
email: EmailStr = Field(
title="Users email", description="Users email", examples=["john@domain.com"]
)
first_name: str = Field(
title="Users first name", description="Users first name", examples=["John"]
)
last_name: str = Field(
title="Users last name", description="Users last name", examples=["Doe"]
)
password: SecretStr = Field(
title="Users password",
description="Users password",
examples=["@SuperSecret123"],
)
class UserResponse(BaseModel):
@@ -23,11 +33,19 @@ class UserResponse(BaseModel):
class TokenResponse(BaseModel):
access_token: str = Field(title="Users access token", description="Users access token")
access_token: str = Field(
title="Users access token", description="Users access token"
)
token_type: str = Field(title="Users token type", description="Users token type")
class UserLogin(BaseModel):
model_config = config
email: EmailStr = Field(title="Users email", description="Users email", examples=["john@domain.com"])
password: SecretStr = Field(title="Users password", description="Users password", examples=["@SuperSecret123"])
email: EmailStr = Field(
title="Users email", description="Users email", examples=["john@domain.com"]
)
password: SecretStr = Field(
title="Users password",
description="Users password",
examples=["@SuperSecret123"],
)