feat: add response models for endpoints returning untyped objects

This commit is contained in:
Mark Paronyan committed 2026-10-07 16:49:31 +03:00
1 parent 0836e01525
commit db031416a1
24 files changed
+1192 -53

No files matched your search

+2 -2
View File
@@ -30,7 +30,7 @@ from gns3server.controller import Controller
router = APIRouter()
@router.get("/engines")
@router.get("/engines", response_model=List[schemas.GNS3VMEngineInfo])
async def get_engines() -> List[dict]:
"""
Return the list of supported engines for the GNS3VM.
@@ -40,7 +40,7 @@ async def get_engines() -> List[dict]:
return gns3_vm.engine_list()
@router.get("/engines/{engine}/vms")
@router.get("/engines/{engine}/vms", response_model=List[schemas.GNS3VMInfo])
async def get_vms(engine: str) -> List[dict]:
"""
Return all the available VMs for a specific virtualization engine.