MCPcopy
hub / github.com/safishamsi/graphify / validate_document

Function validate_document

worked/example/raw/validator.py:17–22  ·  view source on GitHub ↗

Run all validation checks on a parsed document. Raises ValidationError on failure.

(doc: dict)

Source from the content-addressed store, hash-verified

15
16
17def validate_document(doc: dict) -> dict:
18 """Run all validation checks on a parsed document. Raises ValidationError on failure."""
19 check_required_fields(doc)
20 check_format(doc)
21 doc = normalize_fields(doc)
22 return doc
23
24
25def check_required_fields(doc: dict) -> None:

Callers 3

handle_enrichFunction · 0.90
parse_and_saveFunction · 0.90
validate_batchFunction · 0.85

Calls 3

check_required_fieldsFunction · 0.85
check_formatFunction · 0.85
normalize_fieldsFunction · 0.85

Tested by

no test coverage detected