feat(api): add Query parameter description for chat session listing

Add explicit Query parameter with description to the `list_sessions` endpoint for better API documentation and clarity. The `project_id` parameter now includes a descriptive label indicating it is a GNS3 project ID.
This commit is contained in:
YueGuobin 2026-03-04 12:35:38 +08:00
parent 2fe30c69e6
commit 479afc01b0

View File

@ -23,7 +23,7 @@ import logging
import uuid
from typing import Optional, List
from fastapi import APIRouter, Depends, HTTPException, Request, status
from fastapi import APIRouter, Depends, HTTPException, Query, Request, status
from fastapi.responses import StreamingResponse
from uuid import UUID
@ -186,7 +186,7 @@ async def get_history(
description="List all chat sessions for a project (not yet implemented)."
)
async def list_sessions(
project_id: UUID,
project_id: UUID = Query(..., description="GNS3 project ID"),
current_user: schemas.User = Depends(get_current_active_user),
) -> list[schemas.ChatSession]:
"""