Part of #85.
VS Code supports a custom enumDescriptions keyword: an array of plain-text strings, positionally matched to the values in enum, used to describe each allowed value.
Example
{
"type": "string",
"enum": ["debug", "info", "error"],
"enumDescriptions": [
"Log everything",
"Log informational messages and above",
"Log errors only"
]
}
Expected behavior
- Value completion: each enum completion item includes the matching enumDescriptions entry as its documentation.
- If enumDescriptions is shorter than enum, values without a matching entry get no documentation. Extra entries are ignored.
- Schemas without enumDescriptions are unaffected.
Scope question
VS Code only uses enumDescriptions in completion. Should hover over an enum value also show its description, or keep this issue to completion only? I'll start with completion unless if hover should also be included.
Part of #85.
VS Code supports a custom
enumDescriptionskeyword: an array of plain-text strings, positionally matched to the values inenum, used to describe each allowed value.Example
{ "type": "string", "enum": ["debug", "info", "error"], "enumDescriptions": [ "Log everything", "Log informational messages and above", "Log errors only" ] }Expected behavior
Scope question
VS Code only uses
enumDescriptionsin completion. Should hover over an enum value also show its description, or keep this issue to completion only? I'll start with completion unless if hover should also be included.