python-jsonschema / check-jsonschema

A CLI and set of pre-commit hooks for jsonschema validation with built-in support for GitHub Workflows, Renovate, Azure Pipelines, and more!
https://check-jsonschema.readthedocs.io/en/stable
Other
207 stars 40 forks source link

Use the new 'referencing' implementation in 'jsonschema' #289

Closed sirosen closed 1 year ago

sirosen commented 1 year ago

This change drops py3.7 (not supported by 'referencing' and EOL) and switches the implementation to 'referencing'.

Because the way that $ref retrieval works has changed, it unlocks the possibility of having .yaml schemas which refer to other .yaml files as subschemas, etc. This has been implemented, rather than retaining the prior "reject with a warning" behavior for YAML, TOML, and JSON5.

I'd like to see this work in CI at the very least and potentially add some newer test cases to see if I can break it. In particular, there's a bit of mushy $id and schema_uri handling, which I'd like to check with responses.