- Switched from psycopg2 to asyncpg for async SQLAlchemy support - Fixed router registration in main.py - removed duplicate prefixes - Added user_data export to routers/__init__.py - Refactored decks router to use DeckManager service layer - Integrated FuzzyCardMatcher into card_router search endpoints - Made WishlistCreate.card_id optional for proper schema validation - Set PostgreSQL password and configured scram-sha-256 auth - Updated alembic.ini to use local PostgreSQL instead of Docker hostname - Created generic_schemas.py for reusable schema patterns - Added test_routers.py and test_schema_validation.py test files - All 6 Alembic migrations applied successfully (37 tables created) - Application running on port 8000 with all services connected
30 lines
574 B
Python
30 lines
574 B
Python
"""Generic response schemas used across multiple modules."""
|
|
from pydantic import BaseModel
|
|
from typing import Optional, List
|
|
|
|
|
|
class MessageResponse(BaseModel):
|
|
"""Generic message response."""
|
|
message: str
|
|
|
|
|
|
class CountResponse(BaseModel):
|
|
"""Generic count response."""
|
|
count: int
|
|
|
|
|
|
class ErrorResponse(BaseModel):
|
|
"""Standard error response."""
|
|
detail: str
|
|
|
|
|
|
class ValidationErrorResponse(BaseModel):
|
|
"""Validation error response."""
|
|
detail: List[dict]
|
|
|
|
|
|
class ErrorDetail(BaseModel):
|
|
"""Error detail."""
|
|
error: str
|
|
detail: str
|