SchemaVersion¶
VersionMatchResult¶
- class VersionMatchResult(matched: bool, expected_types: list[type], found_types: list[type], missing_types: list[type], unexpected_types: list[type], default_ratio: float)[source]¶
Diagnostic result from
validate_version().matchedis True when all expected types were found anddefault_ratiois strictly below the validation threshold.default_ratiois 1.0 when data is empty.
resolve_version¶
validate_version¶
- validate_version(data: Any, expected_types: list[type], default_type: type, threshold: float = 0.5) VersionMatchResult[source]¶
Validate file data against expected component types.
Uses exact type comparison (
type(item) is default_type) so that subclasses of the default type count as real components.matchedis True when no expected types are missing anddefault_ratio < threshold.