Skip to content

feat: add yaml modeline support for schema definition#681

Open
UnyieldingOrca wants to merge 2 commits intopython-jsonschema:mainfrom
UnyieldingOrca:main
Open

feat: add yaml modeline support for schema definition#681
UnyieldingOrca wants to merge 2 commits intopython-jsonschema:mainfrom
UnyieldingOrca:main

Conversation

@UnyieldingOrca
Copy link
Copy Markdown

This is my attempt at addressing yaml modeline support for check-jsonschema and adding a new precommit hook for running it. This includes support for multi-document yaml processing as well.

Full disclosure this PR was mostly authored with codex + gpt 5.5.

I think this addresses #644 and #340 and would supercede #526.

@sirosen
Copy link
Copy Markdown
Member

sirosen commented May 7, 2026

Hi there, thanks for working on this! It's something I've wanted to do but haven't been able to make the time for.

I don't have time at present to dig into this and do a careful review, but I have some high-level notes:

  • It looks like there's an orthogonal change in here, captured in test_checker_unresolvable_schema_ref_has_concise_error. Could you separate that out into a separate PR? I'm happy to look at changes/improvements to error handling, but mixing it in here will make review harder.
  • There also appear to be changes related to reading multiple documents from a single file. Again, I'm very happy to review or work on this, but I don't think it belongs in this PR? Can we remove it for now?
  • Thanks for noting model usage! I don't have an official policy on this repo yet, but when I add one it will probably look similar to the one I helped write for pip-tools. So the spirit of that applies -- basically, be honest and try to be good. 😄

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