fix(exam): response_model=None on auto-map route (Union[dict,JSONResponse])
Some checks failed
api-ci-deploy / test-build-deploy (push) Has been cancelled

The auto-map endpoint returns dict (sync 200) or JSONResponse (202 async OCR);
FastAPI cannot build a response model from that Union. Fixes import-time
FastAPIError introduced with the S5-2 endpoint.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
CC Worker 2026-06-07 19:52:05 +00:00
parent 2ac892c291
commit a01a25cc2e

View File

@ -686,7 +686,7 @@ async def get_template_source_pdf(
return Response(content=pdf_bytes, media_type="application/pdf")
@router.post("/templates/{template_id}/auto-map")
@router.post("/templates/{template_id}/auto-map", response_model=None)
async def auto_map_template(
template_id: str,
background_tasks: BackgroundTasks,