Skip to content

Commit 2ebce75

Browse files
MarkoVcodeclaude
andcommitted
Fix recordings API 404 error and schema mismatch
This commit resolves two critical issues: 1. Double prefix problem: Routes were registered at /recordings/api/recordings/* instead of /recordings/* due to duplicate prefixes in both the router definition and app.include_router() call. Fixed by removing the prefix from the APIRouter initialization in api_recording.py:68. 2. Schema mismatch: ChannelConfig model had 'parameter' field but frontend expected 'class_name', 'channel', and 'method_name'. Updated the model to match frontend expectations, making 'label' optional. Fixes: #404 on all /recordings/* endpoints 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 641f56f commit 2ebce75

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

benchmesh-serial-service/src/benchmesh_service/api_recording.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@
2424
class ChannelConfig(BaseModel):
2525
"""Configuration for a single recording channel."""
2626
device_id: str
27-
parameter: str
28-
label: str
27+
class_name: str
28+
channel: int
29+
method_name: str
30+
label: Optional[str] = None
2931

3032

3133
class StartRecordingRequest(BaseModel):
@@ -65,7 +67,7 @@ def create_recording_router() -> APIRouter:
6567
Returns:
6668
APIRouter: Configured router
6769
"""
68-
router = APIRouter(prefix="/api/recordings", tags=["recordings"])
70+
router = APIRouter(tags=["recordings"])
6971

7072
@router.post("/start")
7173
async def start_recording(

0 commit comments

Comments
 (0)