diff --git a/backend/routers/steering.py b/backend/routers/steering.py index e8d86a4..5442e21 100644 --- a/backend/routers/steering.py +++ b/backend/routers/steering.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Literal, Optional +from typing import Optional from capabilities import require_capability from fastapi import APIRouter, Depends, HTTPException @@ -17,9 +17,7 @@ router = APIRouter(prefix="/api/steering", tags=["steering"]) class SteeringContextUpdateRequest(BaseModel): - method_key: Optional[ - Literal["generic_operating", "product_milestone_driven"] - ] = None + method_key: str = Field(..., min_length=1) @router.get("/methods") diff --git a/backend/tests/test_ap20_steering_archetypes.py b/backend/tests/test_ap20_steering_archetypes.py index e1607aa..c7490a0 100644 --- a/backend/tests/test_ap20_steering_archetypes.py +++ b/backend/tests/test_ap20_steering_archetypes.py @@ -57,12 +57,12 @@ def test_program_initiative_gets_program_delivery_method(client): assert created.status_code == 201 initiative_id = created.json()["id"] - ctx = client.get( - f"/api/steering/initiatives/{initiative_id}/context", + snap = client.get( + f"/api/initiatives/{initiative_id}/steering-snapshot", headers=_auth(token), ) - assert ctx.status_code == 200 - assert ctx.json()["method_key"] == "program_delivery" + assert snap.status_code == 200 + assert snap.json()["method_key"] == "program_delivery" def test_project_inherits_mirror_archetype(client):