[refactor] Use Pydantic models for query parameter validation

- Added query parameter models to OpenAPI spec for GET endpoints
- Regenerated data models to include new query param models
- Replaced manual validation with Pydantic model validation
- Removed obsolete validate_required_params helper function
- Provides better error messages and type safety for API endpoints

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
bymyself
2025-06-17 14:42:25 -07:00
parent f1b3c6b735
commit a4bf6bddbf
4 changed files with 111 additions and 54 deletions

View File

@@ -49,6 +49,9 @@ from .generated_models import (
UninstallPackParams,
DisablePackParams,
EnablePackParams,
UpdateAllQueryParams,
UpdateComfyUIQueryParams,
ComfyUISwitchVersionQueryParams,
QueueStatus,
ManagerMappings,
ModelMetadata,
@@ -104,6 +107,9 @@ __all__ = [
"UninstallPackParams",
"DisablePackParams",
"EnablePackParams",
"UpdateAllQueryParams",
"UpdateComfyUIQueryParams",
"ComfyUISwitchVersionQueryParams",
"QueueStatus",
"ManagerMappings",
"ModelMetadata",