Function
_validate_schema
(manifest: dict[str, Any], validator: Draft202012Validator)
Source from the content-addressed store, hash-verified
| 712 | |
| 713 | |
| 714 | def _validate_schema(manifest: dict[str, Any], validator: Draft202012Validator) -> tuple[bool, str]: |
| 715 | errors = sorted(validator.iter_errors(manifest), key=lambda e: list(e.path)) |
| 716 | if not errors: |
| 717 | return True, "ok" |
| 718 | first = errors[0] |
| 719 | path = "/".join(str(x) for x in first.path) |
| 720 | return False, f"/{path}: {first.message}" |
| 721 | |
| 722 | |
| 723 | def main() -> int: |
Tested by
no test coverage detected