Add JSON Schema draft discrimination #7

Open
uwiger wants to merge 1 commits from uw-schema-dialects into master
Owner

Track the declared JSON Schema dialect in the validator state and validate
dialect-sensitive constructs before applying a schema.

Recognize draft-04, draft-06, draft-07, 2019-09, and 2020-12, while preserving
the existing compatibility behavior for schemas without a $schema declaration.
Reject unknown dialects and known keywords or forms that do not belong to the
declared draft.

Implement draft-specific exclusive bound semantics, boolean-schema rules, and
array vocabulary differences. Document the behavior and add coverage for all
supported drafts.

The generated Gajumaru draft-04 configuration schema passes the new checks.

Track the declared JSON Schema dialect in the validator state and validate dialect-sensitive constructs before applying a schema. Recognize draft-04, draft-06, draft-07, 2019-09, and 2020-12, while preserving the existing compatibility behavior for schemas without a $schema declaration. Reject unknown dialects and known keywords or forms that do not belong to the declared draft. Implement draft-specific exclusive bound semantics, boolean-schema rules, and array vocabulary differences. Document the behavior and add coverage for all supported drafts. The generated Gajumaru draft-04 configuration schema passes the new checks.
uwiger added 1 commit 2026-08-29 19:21:52 +09:00
Track the declared JSON Schema dialect in the validator state and validate
dialect-sensitive constructs before applying a schema.

Recognize draft-04, draft-06, draft-07, 2019-09, and 2020-12, while preserving
the existing compatibility behavior for schemas without a $schema declaration.
Reject unknown dialects and known keywords or forms that do not belong to the
declared draft.

Implement draft-specific exclusive bound semantics, boolean-schema rules, and
array vocabulary differences. Document the behavior and add coverage for all
supported drafts.

The generated Gajumaru draft-04 configuration schema passes the new checks.
uwiger requested review from apex132 2026-08-29 19:21:52 +09:00
uwiger requested review from dimitar.p.ivanov 2026-08-29 19:21:52 +09:00
uwiger requested review from spivee 2026-08-29 19:21:53 +09:00
uwiger requested review from zxq9 2026-08-29 19:21:53 +09:00
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin uw-schema-dialects:uw-schema-dialects
git checkout uw-schema-dialects
Sign in to join this conversation.