Chore: describe the zone OCR responses in the API schema

The run status and skip reason were string literals, and the test zone
and 404 bodies had no schema. Add enums and response serializers for
them. The JSON is unchanged.
This commit is contained in:
stumpylog committed 2026-11-19 13:54:59 -08:00
1 parent 8f1a6d21ce
commit 246f4e53b1
4 files changed
+152 -14

No files matched your search

+13
View File
@@ -125,6 +125,19 @@ class ZoneOcrReason(StrEnum):
TEMPLATE_FAILED = "template_failed"
class ZoneOcrRunStatus(StrEnum):
"""The overall outcome of a zone OCR run on one document."""
COMPLETED = "completed"
SKIPPED = "skipped"
class ZoneOcrSkipReason(StrEnum):
"""Why a zone OCR run on one document was skipped."""
NO_TEMPLATE = "no_template"
@dataclass(kw_only=True, slots=True)
class ZoneOcrResult:
template: str