Description
Hover currently shows only title and description. JSON Schema's default and examples are also annotations and are already available through getAnnotations(), but we ignore them. Showing them would tell users what value a property takes if omitted, and what valid values look like.
Proposed Scope
- In
Hover.ts, read https://json-schema.org/keyword/default and https://json-schema.org/keyword/examples alongside the existing title/description handling.
- Render them as formatted JSON in the Markdown hover (
examples is an array).
- Add tests in
Hover.test.ts, including a property that has a default but no description etc.
Description
Hover currently shows only
titleanddescription. JSON Schema'sdefaultandexamplesare also annotations and are already available throughgetAnnotations(), but we ignore them. Showing them would tell users what value a property takes if omitted, and what valid values look like.Proposed Scope
Hover.ts, readhttps://json-schema.org/keyword/defaultandhttps://json-schema.org/keyword/examplesalongside the existing title/description handling.examplesis an array).Hover.test.ts, including a property that has a default but no description etc.