Skip to content

Routes

interfaces.ambiguity.routes

Summary

Ambiguity REST handlers — thin API entry points for the ambiguity resource, wired to openapi.yaml operationIds by the OpenAPI-first router. Resolution updates the ambiguity and requeues the parent fetch request when no pending ambiguities remain.

Functions

resolve_ambiguity async

resolve_ambiguity(request: Request, id: str, body: dict)

Resolve an ambiguity by choosing one of its candidates.

Marks the ambiguity resolved, then requeues the parent fetch request when no pending ambiguities remain and the fetch request is paused.

Parameters:

Name Type Description Default
request Request

Incoming HTTP request; carries app.state.db_resources.

required
id str

Ambiguity id.

required
body dict

Resolution payload; must contain the chosen candidate.

required

Returns:

Type Description

Updated ambiguity document.

Raises:

Type Description
HTTPException

400 when the chosen candidate is missing.

HTTPException

404 when the ambiguity is not found.