feat: enforce single tool type with port config
- Replace interfaces array with interface_type string and requires_port boolean - Add database migration for schema change - Update backend model, API schemas, and validation - Update frontend types and tool workshop UI - Add dropdown for interface type selection - Conditionally show/hide port fields based on requires_port - Update tests and mock data - All frontend tests pass (37/37) - Frontend typecheck and lint pass
This commit is contained in:
@@ -18,7 +18,8 @@ class ToolType(UUIDPrimaryKeyMixin, TimestampMixin, Base):
|
||||
display_name: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
description: Mapped[str | None] = mapped_column(Text, nullable=True)
|
||||
category: Mapped[str] = mapped_column(String(50), nullable=False, default="other")
|
||||
interfaces: Mapped[list[str]] = mapped_column(JSON, default=list, nullable=False)
|
||||
interface_type: Mapped[str] = mapped_column(String(20), nullable=False, default="web")
|
||||
requires_port: Mapped[bool] = mapped_column(Boolean, default=True, nullable=False)
|
||||
default_port: Mapped[int] = mapped_column(nullable=False)
|
||||
definition_type: Mapped[str] = mapped_column(
|
||||
String(20), nullable=False, default="compose"
|
||||
|
||||
Reference in New Issue
Block a user