Skip to content

Registry error diagnostics - #133

Merged
jdesrosiers merged 3 commits into
mainfrom
registry-error-diagnostics
Oct 3, 2026
Merged

jdesrosiers merged 3 commits into
mainfrom
registry-error-diagnostics

Conversation

@jdesrosiers

Copy link
Copy Markdown
Collaborator

Resolves #119

Adds a SchemaRegistrationDiagnosticsProvider that handles surfacing errors related to registering schemas, especially handling duplicate identifier errors. Duplicate ids now get an error on the schema that wasn't registered, a warning on the schema that was registered, and a warning on any schema that $schemas a schema whose identifier is ambiguous. Cache invalidation and diagnostics work as expected when the error is resolved.

Also includes a fix for URI normalization problems on windows.

@jdesrosiers

Copy link
Copy Markdown
Collaborator Author

NOTE: I just remembered that the warning for a document that references schema whose identifier is ambiguous only works for the top level. If the document references a schema that references a schema whose identifier is ambiguous, we should still get the warning.

The ambiguous identifier warning on $schema only checked the schema it
names. A schema it references, directly or indirectly, with a duplicate
identifier is just as ambiguous, so those are now reported on $schema
too. Dependencies come from the compiled schema, which is shared with
validation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jdesrosiers
jdesrosiers merged commit b89068e into main Oct 3, 2026
6 checks passed
@jdesrosiers
jdesrosiers deleted the registry-error-diagnostics branch October 3, 2026 22:01
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.

Handle schemas with conflicting identifiers

1 participant