Skip to content

Bundle SchemaStore base references for offline validation - #728

Closed
mayankdhingra02 wants to merge 1 commit into
python-jsonschema:mainfrom
mayankdhingra02:fix-offline-schemastore-references
Closed

mayankdhingra02 wants to merge 1 commit into
python-jsonschema:mainfrom
mayankdhingra02:fix-offline-schemastore-references

Conversation

@mayankdhingra02

Copy link
Copy Markdown

Closes #655.

Bundle SchemaStore's shared base.json definitions and preload its download
and canonical URI forms when validating vendored builtin schemas. Custom and
user-supplied schemas keep their existing reference retrieval behavior, and a
root schema registered at either URI keeps precedence.

The internal reference schema participates in the existing update/digest
pipeline without generating a standalone hook. README and changelog entries
describe the offline capability.

Current vendored snapshots do not reference base.json yet. Regression
fixtures exercise that dependency through the builtin loader: all four
vendor-name/URI combinations fail without the fix, then validate offline with
the bundled definitions. Other cases cover custom/local retrieval and root
resource precedence.

Validation: the complete default tox run passed all 21 environments,
including 17 pytest configurations across Python 3.10–3.14, minimum
dependencies, JSON5/pyjson5, optional formats, and the stdlib JSON fallback
(10,590 passes, 188 expected skips, zero failures; combined coverage 96%).
All configured pre-commit hooks and the strict Sphinx build passed. The hook
generator produced no changes. Wheel/sdist builds, twine check, and
check-sdist --inject-junk passed; both distributions contain base.json and
its matching SHA-256 file.

Bundle SchemaStore's base definitions and register their URI aliases for
vendored schema validators. Preserve root resources and the existing
reference retrieval behavior for custom and user-provided schemas.

Keep reference-only schemas in the vendoring pipeline without generating
standalone hooks. Add offline resolution and root-precedence regressions.

Closes python-jsonschema#655

Signed-off-by: Mayank Dhingra <mayankdhingra02@gmail.com>
@sirosen

sirosen commented Oct 15, 2026

Copy link
Copy Markdown
Member

@sirosen sirosen closed this Oct 15, 2026
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.

Vendor schemastore base.json and inject it into the referencing store automatically when loading vendored schemas

2 participants