Manually update schema in the workflow.
(
pipeline_id: str,
schema_fields: List[SchemaFieldUpdate],
manager: WorkflowManager = Depends(get_manager)
)
| 84 | |
| 85 | @router.post("/workflow/{pipeline_id}/schema") |
| 86 | async def update_schema( |
| 87 | pipeline_id: str, |
| 88 | schema_fields: List[SchemaFieldUpdate], |
| 89 | manager: WorkflowManager = Depends(get_manager) |
| 90 | ): |
| 91 | """Manually update schema in the workflow.""" |
| 92 | try: |
| 93 | workflow = await manager.update_schema( |
| 94 | pipeline_id, |
| 95 | [field.dict() for field in schema_fields], |
| 96 | user="user" |
| 97 | ) |
| 98 | return { |
| 99 | "success": True, |
| 100 | "workflow": workflow.dict(), |
| 101 | "message": f"Updated schema with {len(schema_fields)} fields" |
| 102 | } |
| 103 | except ValueError as e: |
| 104 | raise HTTPException(status_code=404, detail=str(e)) |
| 105 | except Exception as e: |
| 106 | raise HTTPException(status_code=500, detail=str(e)) |
| 107 | |
| 108 | |
| 109 | @router.post("/workflow/{pipeline_id}/approve") |
nothing calls this directly
no test coverage detected