mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
feat: add response models for endpoints returning untyped objects
This commit is contained in:
24 files changed
+1192
-53
No files matched your search
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user