Skip to content

fix(Compiler): report schema keywords and locations alike in 3.0 and 3.1 - #2440

Merged
DerManoMann merged 1 commit into
zircote:masterfrom
DerManoMann:fix/schema-messages
Nov 24, 2026
Merged

DerManoMann merged 1 commit into
zircote:masterfrom
DerManoMann:fix/schema-messages

Conversation

@DerManoMann

Copy link
Copy Markdown
Collaborator

Overview

The 3.0 compiler reports prefixItems, unevaluatedItems, unevaluatedProperties and if/then/else with checks of its own: as errors, worded unlike every other property a version cannot write, and with if/then/else in one message. The other 3.1 schema keywords, contains for example, are warnings in the standard wording.

A schema created during type resolution has no location of its own. 3.1 reports one without items as "in unknown", while 3.0 names the property or parameter that holds it.

The generated documents do not change. The log does: in 3.0 these keywords are warnings now, so a document using them is valid, and a nested schema's unsupported keywords are reported at its owner's location.

Changes

  • The 3.0 compiler lists the six keywords as unsupported properties; its hand-written checks are gone
  • validateUnsupportedProperties() reports a schema without a location at its owner's
  • 3.1's array-without-items warning uses schemaLocation()
  • Tests for both, and the scratch expectations updated

Move prefixItems, unevaluatedItems, unevaluatedProperties and if/then/else to
the 3.0 `UNSUPPORTED_PROPERTIES` and drop their hand-written checks. The shared
check and the 3.1 array-without-items warning name a schema's owner where the
schema has no location of its own.
@DerManoMann
DerManoMann merged commit ac78902 into zircote:master Nov 24, 2026
25 checks passed
@DerManoMann
DerManoMann deleted the fix/schema-messages branch November 24, 2026 20:14
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