Skip to content

Support deprecated - #136

Open
Suyog241005 wants to merge 4 commits into
hyperjump-io:mainfrom
Suyog241005:support-deprecated
Open

Suyog241005 wants to merge 4 commits into
hyperjump-io:mainfrom
Suyog241005:support-deprecated

Conversation

@Suyog241005

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for the standard deprecated keyword and VS Code's custom deprecationMessage and markdownDeprecationMessage keywords.

What changed

  • Registered deprecationMessage and markdownDeprecationMessage in the vscode vocabulary, with meta-schema entries.
  • Added getDeprecation, a small helper that reads the vocabulary keyword URIs, their unknown# fallbacks, and the standard deprecated keyword from annotations. All features below use it.
  • Hover: appends ⚠️ **Deprecated:** <message>, or ⚠️ **Deprecated** when only deprecated: true is set. markdownDeprecationMessage takes precedence over deprecationMessage.
  • Diagnostics: new DeprecatedDiagnosticsProvider reports a Warning tagged Deprecated for every deprecated location. For property values the range covers the key, matching VS Code. For other values (e.g. array items) it covers the value itself.
  • Property completions: deprecated properties get CompletionItemTag.Deprecated and the message as markdown documentation. To support this, AnnotationsEvaluationPlugin now also builds annotations for declared properties absent from the instance, since those are the completion candidates.
  • Value completions: values at a deprecated location are tagged the same way.

Screenshots

Diagnostics and hover:

Screenshot 2026-10-04 at 3 42 34 PM

Property completions:

Screenshot 2026-10-04 at 3 42 09 PM

Out of scope

As discussed in #86, tagging value completions for a single deprecated anyOf alternative is left for a follow-up.

Closes #97
Closes #86

Registers deprecationMessage and markdownDeprecationMessage in the vscode
vocabulary and reads them (or the standard deprecated keyword) from
annotations in Hover.
Adds DeprecatedDiagnosticsProvider, which walks the document and emits a
Warning tagged Deprecated for any location whose annotations carry
deprecationMessage, markdownDeprecationMessage, or deprecated: true.
AnnotationsEvaluationPlugin now also builds annotations for declared
properties absent from the instance so completion candidates can be
checked for deprecation.
@Suyog241005

Copy link
Copy Markdown
Contributor Author

Hi @jdesrosiers, this is ready for review whenever you have time.

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.

Support deprecationMessage custom keyword Support "deprecated"

1 participant