Skip to content

Unified suite fixes - #1216

Merged
jdesrosiers merged 2 commits into
json-schema-org:unifyfrom
jdesrosiers:fix-compatibility
Oct 11, 2026
Merged

jdesrosiers merged 2 commits into
json-schema-org:unifyfrom
jdesrosiers:fix-compatibility

Conversation

@jdesrosiers

Copy link
Copy Markdown
Member

I found a couple of issues with the new suite by running it though a couple of bowtie harnesses.

One issue I found was that the check for unknown keywords doesn't work quite right. It only checks top level keywords. Subschemas aren't considered. I updated it to have the same behavior as main, but that doesn't work right either. That one only catches subschemas that evaluate against the instance 12, which wouldn't catch much. That will have to be addressed in a follow up.

"pattern with Unicode property escape" had no compatibility, so it
applied to every dialect, though it only applies from 2020-12. "pattern
with Unicode property escape requires unicode mode" applied only to
2020-12, though it applies from 2020-12 on, including v1.

"items and subitems (7)" used the array form of `required` and "id must
be resolved against nearest parent, not just immediate parent" used
`not`, both from draft 4, yet both included draft 3. Rewrite them with
keywords draft 3 also has so they still apply to it: the sub-item
constrains `foo` with `properties` rather than requiring it, and the
nested `id` is wrapped in `items` rather than `not`.

The optional ecmascript-regex cases using Unicode property escapes
("patterns always use unicode semantics" and "non-ASCII digits", for
both `pattern` and `patternProperties`) had no compatibility either,
though they also need the Unicode mode 2020-12 introduced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jdesrosiers
jdesrosiers requested a review from a team as a code owner October 11, 2026 01:26
The unknown-keyword check only reported keywords that appeared at the top
level of a case's schema, so unknown keywords in subschemas were ignored.

That filter was also masking a second bug: the strict keyword wrapper was
installed once per case, each time wrapping the previous wrapper, and
copying it read every keyword in the validator's table. Under jsonschema
4.19.0 that includes `additionalItems` for 2020-12, which tripped the check.
Wrappers are now installed once per dialect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jdesrosiers
jdesrosiers merged commit 0280a95 into json-schema-org:unify Oct 11, 2026
3 checks passed
@jdesrosiers
jdesrosiers deleted the fix-compatibility branch October 11, 2026 01:33
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.

1 participant