API/ValidationReport

Data Objects

ValidationReport

Understand complete validation results, declared-layer status, and structured issues.

ValidationReport is the immutable validation report returned by validate_octx(). Ordinary format, digest, and structural errors are recorded in the report, so callers do not need to parse exception text.

Getting the object

python
from octx import validate_octx

report = validate_octx("product-guide.octx")

if not (report.valid and report.fully_validated):
    for issue in report.issues:
        print(issue.severity, issue.code, issue.path, issue.message)

Fields

FieldPurpose
validWhether the OCTX format and all executed known layers are valid.
fully_validatedWhether the current installation understands and has completely validated every declared layer.
formatLayerResult for the OCTX format.
capabilitiesRead-only mapping from Capability names to LayerResult objects.
issuesEvery ValidationIssue.
issue_codesRead-only set of error codes in the report.

LayerResult contains declared, valid, version, fully_validated, and the layer's issues.

ValidationIssue contains code, severity, and message, plus optional path, line, and record_id values.

Publication or high-trust import should generally require both valid and fully_validated to be True. Use report.to_dict() to obtain a JSON-serializable structure.