Skip to content

Move validate to a JSE output format for @hyperjump/json-schema - #284

Merged
jdesrosiers merged 1 commit into
mainfrom
move-validate-to-json-schema
Oct 5, 2026
Merged

jdesrosiers merged 1 commit into
mainfrom
move-validate-to-json-schema

Conversation

@jdesrosiers

Copy link
Copy Markdown
Collaborator

Importing this package now registers a JSE output format with @hyperjump/json-schema's setOutputFormat, so validation can return error messages directly. This replaces validate and evaluateCompiledSchema. JSE's output type and the locale option are added to @hyperjump/json-schema's types by augmenting OutputFormats and ValidationOptions.

Whether a keyword is a simple applicator now comes from its @hyperjump/json-schema keyword definition instead of being duplicated on normalization handlers. then, else, and dependentSchemas are simple applicators there, so their results are merged into their parent
schema. Their normalization handlers are marked as conditional so their merged results aren't described as requirements of the parent, since their handlers describe them along with the condition. Applicators keep their subschemas' outputs so they can be described. This replaces
validityFromSubschemas.

This requires @hyperjump/json-schema 1.18.0, which adds setOutputFormat
and no longer treats if as a simple applicator.

Importing this package now registers a JSE output format with
@hyperjump/json-schema's setOutputFormat, so validation can return error
messages directly. This replaces validate and evaluateCompiledSchema.
The output plugin stays in this package. JSE's output type and the
locale option are added to @hyperjump/json-schema's types by augmenting
OutputFormats and ValidationOptions.

Whether a keyword is a simple applicator now comes from its
@hyperjump/json-schema keyword definition instead of being duplicated
on normalization handlers. 'then', 'else', and 'dependentSchemas' are
simple applicators there, so their results are merged into their parent
schema. Their normalization handlers are marked as conditional so their
merged results aren't described as requirements of the parent, since
their handlers describe them along with the condition. Applicators keep
their subschemas' outputs so they can be described. This replaces
validityFromSubschemas.

This requires @hyperjump/json-schema 1.18.0, which adds setOutputFormat
and no longer treats 'if' as a simple applicator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jdesrosiers
jdesrosiers merged commit 872cbea into main Oct 5, 2026
2 checks passed
@jdesrosiers
jdesrosiers deleted the move-validate-to-json-schema branch October 6, 2026 05:02
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