(form_doc_path: pathlib.Path)
| 90 | |
| 91 | |
| 92 | def validate_doc(form_doc_path: pathlib.Path) -> FormDoc: |
| 93 | if not form_doc_path.exists(): |
| 94 | raise ValueError(f"Form document at {form_doc_path} does not exist") |
| 95 | with form_doc_path.open("rt") as fo: |
| 96 | payload = yaml.safe_load(fo) |
| 97 | return FormDoc.model_validate(payload) |
no outgoing calls