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,41 @@
|
||||
"""Project module."""
|
||||
"""Project schemas module."""
|
||||
|
||||
from src.schemas.project.git_repository import (
|
||||
GitRepositoryCreate,
|
||||
GitRepositoryResponse,
|
||||
UpdateSSHKeyRequest,
|
||||
URLParseRequest,
|
||||
URLParseResponse,
|
||||
)
|
||||
from src.schemas.project.project import (
|
||||
ProjectCreate,
|
||||
ProjectResponse,
|
||||
ProjectUpdate,
|
||||
SetDefaultSSHKeyRequest,
|
||||
)
|
||||
from src.schemas.project.ssh_key import (
|
||||
SSHKeyCreate,
|
||||
SSHKeyResponse,
|
||||
SignPayloadRequest,
|
||||
SignatureResponse,
|
||||
VerifySignatureRequest,
|
||||
VerifySignatureResponse,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"GitRepositoryCreate",
|
||||
"GitRepositoryResponse",
|
||||
"ProjectCreate",
|
||||
"ProjectResponse",
|
||||
"ProjectUpdate",
|
||||
"SSHKeyCreate",
|
||||
"SSHKeyResponse",
|
||||
"SetDefaultSSHKeyRequest",
|
||||
"SignPayloadRequest",
|
||||
"SignatureResponse",
|
||||
"URLParseRequest",
|
||||
"URLParseResponse",
|
||||
"UpdateSSHKeyRequest",
|
||||
"VerifySignatureRequest",
|
||||
"VerifySignatureResponse",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user