Phase 5.14: API documentation - OpenAPI tags, response models, examples, docs
This commit is contained in:
@@ -9,13 +9,13 @@ from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.core.db import get_db
|
||||
from app.deps import require_permission
|
||||
from app.schemas.system_settings import SystemSettingsUpsert
|
||||
from app.schemas.system_settings import SystemSettingsUpsert, SystemSettingsResponse
|
||||
from app.services import system_settings_service
|
||||
|
||||
router = APIRouter(prefix="/api/v1/system-settings", tags=["system-settings"])
|
||||
|
||||
|
||||
@router.get("")
|
||||
@router.get("", response_model=SystemSettingsResponse)
|
||||
async def get_system_settings(
|
||||
db: AsyncSession = Depends(get_db),
|
||||
current_user: dict = Depends(require_permission("settings:read")),
|
||||
@@ -28,7 +28,7 @@ async def get_system_settings(
|
||||
return result
|
||||
|
||||
|
||||
@router.put("")
|
||||
@router.put("", response_model=SystemSettingsResponse)
|
||||
async def upsert_system_settings(
|
||||
body: SystemSettingsUpsert,
|
||||
db: AsyncSession = Depends(get_db),
|
||||
|
||||
Reference in New Issue
Block a user