From 479afc01b0446b7301c2ad508b49256200c5b7e1 Mon Sep 17 00:00:00 2001 From: YueGuobin Date: Wed, 4 Mar 2026 12:35:38 +0800 Subject: [PATCH] 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. --- gns3server/api/routes/controller/chat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3server/api/routes/controller/chat.py b/gns3server/api/routes/controller/chat.py index 093aeebde..f8327cdd2 100644 --- a/gns3server/api/routes/controller/chat.py +++ b/gns3server/api/routes/controller/chat.py @@ -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]: """