Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Unreleased

.. vendor-insert-here

- Fix a minor bug with the verbose output introduced in v0.26.2

0.26.2
------

Expand Down
4 changes: 3 additions & 1 deletion src/check_jsonschema/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ def _build_result(self) -> CheckResult:
result.record_parse_error(path, data)
else:
validator = self.get_validator(path, data)
passing = True
for err in validator.iter_errors(data):
result.record_validation_error(path, err)
else:
passing = False
if passing:
result.record_validation_success(path)
return result

Expand Down
2 changes: 1 addition & 1 deletion src/check_jsonschema/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def _dump_parse_errors(
def report_errors(self, result: CheckResult) -> None:
report_obj: dict[str, t.Any] = {"status": "fail"}
if self.verbosity > 1:
report_obj["checked_paths"] = list(result.successes)
report_obj["successes"] = list(result.successes)
if self.verbosity > 0:
report_obj["errors"] = list(self._dump_error_map(result.validation_errors))
report_obj["parse_errors"] = list(
Expand Down