diff --git a/backend/app/db/models.py b/backend/app/db/models.py index fe73763..5c004fb 100644 --- a/backend/app/db/models.py +++ b/backend/app/db/models.py @@ -69,7 +69,7 @@ class Edge(Base): animated: Mapped[str] = mapped_column(String, nullable=False, default='none') source_handle: Mapped[str | None] = mapped_column(String) target_handle: Mapped[str | None] = mapped_column(String) - waypoints: Mapped[list | None] = mapped_column(JSON, nullable=True) + waypoints: Mapped[list[dict[str, float]] | None] = mapped_column(JSON, nullable=True) created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), default=_now) diff --git a/backend/app/schemas/canvas.py b/backend/app/schemas/canvas.py index 18e4e31..1eccd96 100644 --- a/backend/app/schemas/canvas.py +++ b/backend/app/schemas/canvas.py @@ -50,7 +50,7 @@ class EdgeSave(BaseModel): animated: str = 'none' source_handle: str | None = None target_handle: str | None = None - waypoints: list | None = None + waypoints: list[dict[str, float]] | None = None @field_validator('animated', mode='before') @classmethod diff --git a/backend/app/schemas/edges.py b/backend/app/schemas/edges.py index 9c83d8a..8baa45b 100644 --- a/backend/app/schemas/edges.py +++ b/backend/app/schemas/edges.py @@ -17,7 +17,7 @@ class EdgeBase(BaseModel): animated: str = 'none' source_handle: str | None = None target_handle: str | None = None - waypoints: list | None = None + waypoints: list[dict[str, float]] | None = None @field_validator('animated', mode='before') @classmethod @@ -39,7 +39,7 @@ class EdgeUpdate(BaseModel): animated: str | None = None source_handle: str | None = None target_handle: str | None = None - waypoints: list | None = None + waypoints: list[dict[str, float]] | None = None @field_validator('animated', mode='before') @classmethod