redhat-developer / redhat-developer/vscode-yaml
Broken completion for allof inside ref
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Describe the bug
Expected Behavior
Completion returns key:\n\t
Current Behavior
Completion returns key
Steps to Reproduce
- Insert
# yaml-language-server: $schema=example.schema.jsonas file header - Try a working example and observe expected behavior:
{
"title": "Values",
"type": "object",
"$schema": "http://json-schema.org/schema#",
"$ref": "#/$defs/instance",
"required": [
"thisinstance"
],
"$defs": {
"union": {
"type": "object",
"properties": {
"config0": {
"type": "string"
}
}
},
"instance": {
"type": "object",
"properties": {
"thisinstance": {
"$ref": "#/$defs/union"
}
}
}
}
}
- Try a broken example and observe undesired behavior
{
"title": "Values",
"type": "object",
"$schema": "http://json-schema.org/schema#",
"$ref": "#/$defs/instance",
"required": [
"thisinstance"
],
"$defs": {
"union": {
"allOf": [
{
"type": "object",
"properties": {
"config0": {
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"config1": {
"type": "string"
}
}
}
]
},
"instance": {
"type": "object",
"properties": {
"thisinstance": {
"$ref": "#/$defs/union"
}
}
}
}
}
Environment
- Linux
Contributor guide
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
Reproduce the completion behavior using the schema examples and the YAML language-server schema header described in the issue. Completion should return key:\n\t for the allOf-inside-$ref case, matching the working example rather than returning only key.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json, typescript, yaml
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100