Skip to content

feat: add lint option to show all schema errors#1125

Merged
jschoedl merged 3 commits intodatacontract:mainfrom
jmbenedetto:main
Apr 9, 2026
Merged

feat: add lint option to show all schema errors#1125
jschoedl merged 3 commits intodatacontract:mainfrom
jmbenedetto:main

Conversation

@jmbenedetto
Copy link
Copy Markdown
Contributor

Summary

  • add an opt-in --all-errors lint mode that reports all JSON Schema validation errors instead of only the first one.
  • keep the existing default fastjsonschema path unchanged, and use jsonschema.iter_errors(...) only for the all-errors path.
  • add focused tests and a multi-error fixture, and expose the same behavior in the /lint API via all_errors=true.

Validation

  • uv run --extra dev pytest tests/test_lint.py
  • uv run --extra dev ruff check datacontract/cli.py datacontract/api.py datacontract/data_contract.py datacontract/lint/resolve.py datacontract/model/exceptions.py tests/test_lint.py

Notes

  • This change was vibecoded in OpenCode using GPT-5.4.

@jschoedl
Copy link
Copy Markdown
Collaborator

jschoedl commented Apr 8, 2026

Hi, thank you for your PR! Please run ruff format, add a Changelog entry, and update README. LGTM besides that.

@jmbenedetto
Copy link
Copy Markdown
Contributor Author

Done — I ran ruff format, added a CHANGELOG entry, and updated the README for the new --all-errors lint mode.

# Conflicts:
#	CHANGELOG.md
#	README.md
#	datacontract/data_contract.py
@jschoedl jschoedl merged commit 15dc993 into datacontract:main Apr 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants