feat(api): standardize REST contracts and auth

This commit is contained in:
2026-07-30 20:38:51 +08:00
parent ae1a657554
commit ba947b616b
86 changed files with 54193 additions and 990 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ from app.api.v1.endpoints import leakage as leakage_endpoint
def _build_client() -> TestClient:
app = FastAPI()
app.include_router(leakage_endpoint.router, prefix="/api/v1/leakage")
app.include_router(leakage_endpoint.router, prefix="/api/v1")
app.dependency_overrides[leakage_endpoint.get_current_keycloak_username] = (
lambda: "tester"
)
@@ -23,7 +23,7 @@ def test_identify_leakage_success(monkeypatch):
)
client = _build_client()
response = client.post(
"/api/v1/leakage/identify/",
"/api/v1/leakage-identifications",
json={
"network": "demo",
"scada_start": "2026-01-01T00:00:00+08:00",