Repository navigation
fix: scope property annotations to offering anyOf/oneOf alternatives - #185
Open
SHUBHANSHU602 wants to merge 17 commits into
Open
SHUBHANSHU602 wants to merge 17 commits into
SHUBHANSHU602 wants to merge 17 commits into
Conversation
SHUBHANSHU602
marked this pull request as draft
November 4, 2026 07:22
SHUBHANSHU602
marked this pull request as ready for review
November 9, 2026 04:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jdesrosiers
reviewed
Nov 9, 2026
jdesrosiers
left a comment
Collaborator
There was a problem hiding this comment.
I think this is on the right track. I pushed tests to your branch.
The "suggested before the discriminant is typed" test passes. The rest are regressions (pass on main, fail here):
- Differing child titles are lost from key hover and completion docs.
defaultSnippetsfrom a single alternative aren't offered.- A
$reftitle and a sibling title in one alternative are treated as a conflict (sharedAnnotationKeywords). - A schema applied twice duplicates its annotations, because
withoutSharedKeywordsdefeats the identity dedupe.
The cause is that every keyword gets reconciled. Only doNotSuggest and deprecated need to be.
Author
|
@jdesrosiers Please review it ,when u have time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #168 by preventing annotations from one
anyOf/oneOfalternative from incorrectly affecting properties offered by other alternatives.Previously, a property's
doNotSuggestordeprecatedannotation could be treated as unconditional even when another alternative offered the same property without that annotation.Changes
anyOf,oneOf, nested alternatives, deeper child locations,doNotSuggest, anddeprecated.Testing
Verified locally on Windows:
npm --prefix language-server test— 617 tests passed across 21 filesnpm --prefix language-server run type-check— Passednpm --prefix language-server run lint— PassedFeedback requested
@jdesrosiers, I've followed the per-pointer and per-keyword approach we discussed in #168.
I'd particularly appreciate feedback on
mergeAlternativeAnnotationsandreconcileAlternativeValueSets, especially the distinction between property-location annotations and annotations associated with possible values.I've opened this as a draft PR for early architectural review.