Format everything

This commit is contained in:
Jacob Windsor
2025-02-19 16:25:48 +01:00
parent ed6c49a1b7
commit ecfef9a09d
22 changed files with 115 additions and 62 deletions
+20 -6
View File
@@ -1,9 +1,23 @@
from pydantic import BaseModel, Field
class HouseCreateRequest(BaseModel):
address: str = Field(..., min_length=1, max_length=255, description="House address", examples=["123 Main St"])
city: str = Field(..., description="City where the house is located", examples=["Springfield"])
country: str = Field(..., description="Country where the house is located", examples=["USA"])
price: float = Field(..., description="Price of the house", examples=[250000.00])
description: str = Field(..., description="Description of the house", examples=["A beautiful 3-bedroom house"])
class HouseCreateRequest(BaseModel):
address: str = Field(
...,
min_length=1,
max_length=255,
description="House address",
examples=["123 Main St"],
)
city: str = Field(
..., description="City where the house is located", examples=["Springfield"]
)
country: str = Field(
..., description="Country where the house is located", examples=["USA"]
)
price: float = Field(..., description="Price of the house", examples=[250000.00])
description: str = Field(
...,
description="Description of the house",
examples=["A beautiful 3-bedroom house"],
)
+1 -1
View File
@@ -1,5 +1,5 @@
from pydantic import BaseModel
class HouseCreateResponse(BaseModel):
id: str
+2
View File
@@ -1,5 +1,6 @@
from pydantic import BaseModel
class HouseResponse(BaseModel):
id: str
description: str
@@ -8,5 +9,6 @@ class HouseResponse(BaseModel):
country: str
price: float
class HousesListResponse(BaseModel):
houses: list[HouseResponse]
+1 -1
View File
@@ -1,7 +1,7 @@
from pydantic import BaseModel
class OwnerDetailResponse(BaseModel):
id: str
user_id: str
email: str
+2 -1
View File
@@ -1,9 +1,10 @@
from pydantic import BaseModel
class OwnerResponse(BaseModel):
id: str
user_id: str
class OwnerListResponse(BaseModel):
owners: list[OwnerResponse]
owners: list[OwnerResponse]