Support Draft 2020-12 relative JSON Pointer index manipulation#1534
Open
dev-willbird1936 wants to merge 1 commit into
Open
Support Draft 2020-12 relative JSON Pointer index manipulation#1534dev-willbird1936 wants to merge 1 commit into
dev-willbird1936 wants to merge 1 commit into
Conversation
Documentation build overview
|
dev-willbird1936
force-pushed
the
prep/fnd-0240-relative-json-pointer
branch
5 times, most recently
from
July 25, 2026 23:25
7b8d476 to
66eb0db
Compare
dev-willbird1936
force-pushed
the
prep/fnd-0240-relative-json-pointer
branch
from
July 25, 2026 23:26
66eb0db to
9e0ef8a
Compare
Member
|
The first step here should be a PR to https://github.com/json-schema-org/JSON-Schema-Test-Suite ! |
Author
|
I opened the prerequisite implementation-neutral test-suite coverage in json-schema-org/JSON-Schema-Test-Suite#1032. I will keep this implementation PR aligned with the outcome there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1533.
Summary
Root cause
The same checker was registered for Draft 7, Draft 2019-09, and Draft 2020-12, but it implements the older
draft-handrews-relative-json-pointer-01syntax. Draft 2020-12 referencesdraft-bhutton-relative-json-pointer-00, which adds an optional+Nor-Nindex manipulation after the initial non-negative integer.The old checker passes the signed suffix to
jsonpointer.JsonPointer, so valid values such as0+1/fooare rejected because the remainder does not begin with/.Fix
Register a Draft 2020-12-specific checker that parses the initial integer and optional signed offset before validating the remaining JSON Pointer. Retain the existing function for Draft 7 and Draft 2019-09.
Tests
0+1,0+1/foo,1-2/bar,0-0, and0-1#.jsonschematest suite and targeted ruff checks pass.Checklist