MAESTRO: add tests endpoint schema

This commit is contained in:
Mariusz Banach
2026-02-18 01:01:09 +01:00
parent 77c1881534
commit 158074ef32
6 changed files with 28 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
from __future__ import annotations
from fastapi import APIRouter
from app.engine.scanner_registry import ScannerRegistry
from app.schemas.tests import TestResponse
router = APIRouter(prefix="/api", tags=["tests"])
@router.get("/tests", response_model=list[TestResponse])
def list_tests() -> list[TestResponse]:
registry = ScannerRegistry()
tests = registry.list_tests()
return [TestResponse.model_validate(test) for test in tests]