microsoft / microsoft/vscode-json-languageservice
Distinguish between schema value completion types (e.g. enum and default/example values)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 326
- Forks
- 145
- Avg merge
- 22h 10m
- Merged PRs (30d)
- 9
Description
Currently, the implementation of methods called by JSONCompletion.addSchemaValueCompletions (addEnumValueCompletions, addDefaultValueCompletions and so on) is such that enum and default values (such as examples from a JSON Schema) are indistinguishable because they're conveyed the same way.
From a schema perspective, however, the two are notably different: enums are enforced during validation but default values and examples are not.
Is it possible for these to be distinguished in some manner when generating the completions?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/services/jsonCompletion.ts at JSONCompletion.addSchemaValueCompletions and the addEnumValueCompletions and addDefaultValueCompletions methods. Trace how enum, default, and example values are conveyed in generated completions, then define a distinction that preserves their schema meaning and verify the completion results expose it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100