refactor: extract Pydantic schemas into schemas/ subpackages
Extract inline Pydantic models from 9 API routers into dedicated schema modules under schemas/: - schemas/tool/tool_type.py — ToolTypeCreate, ToolTypeUpdate, etc. - schemas/tool/tool_instance.py — CreateInstanceRequest, StartInstanceRequest - schemas/config/config_profile.py — ConfigProfileCreate, ConfigProfileUpdate, ConfigProfileResponse, DefaultProfilesUpdate, ValidateGitUrlRequest, etc. - schemas/system/health.py — DatabaseHealth, DiskHealth, HealthResponse, etc. - schemas/user/user.py — UserProfileResponse, UserProfileUpdate - schemas/user/user_config.py — UserConfigResponse, UserConfigUpdate - schemas/project/project.py — ProjectCreate, ProjectUpdate, etc. - schemas/project/ssh_key.py — SSHKeyCreate, SSHKeyResponse, etc. - schemas/project/git_repository.py — GitRepositoryCreate, etc. API routers now import from src.schemas.* instead of defining inline. Net change: -548 lines across 16 files. Quality gates: py_compile passed, ruff passed on all 18 files.
This commit is contained in:
@@ -1 +1,11 @@
|
||||
"""User module."""
|
||||
"""User schemas module."""
|
||||
|
||||
from src.schemas.user.user import UserProfileResponse, UserProfileUpdate
|
||||
from src.schemas.user.user_config import UserConfigResponse, UserConfigUpdate
|
||||
|
||||
__all__ = [
|
||||
"UserConfigResponse",
|
||||
"UserConfigUpdate",
|
||||
"UserProfileResponse",
|
||||
"UserProfileUpdate",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user