redhat-developer / redhat-developer/vscode-yaml
`allOf` with condition breaks completion
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Describe the bug
While choosing suggested property value, Tab inserts <property-value>: <property-value> instead of just <property-value>:

Expected Behavior
<property-value> to be inserted instead of <property-value>: <property-value>.
Current Behavior
<property-value>: <property-value> being inserted.
Steps to Reproduce
Setup:
{
"$schema": "http://json-schema.org/draft-07/schema",
"definitions": {
"version-property": {
"description": "A syntax version\nhttps://taskfile.dev/usage/#getting-started",
"type": "string",
"enum": [
"2"
]
},
"v2-properties": {
"properties": {
"version": {
"$ref": "#/definitions/version-property"
}
},
"additionalProperties": false
}
},
"title": "tasks",
"description": "Tasks",
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"$ref": "#/definitions/version-property"
}
},
"allOf": [
{
"if": {
"properties": {
"version": {
"const": "2"
}
}
},
"then": {
"$ref": "#/definitions/v2-properties"
}
}
]
}
schema for some local YAML file via .vscode/settings.json
Try to complete version value and obtain this bug.
Environment
- Windows
- Mac
- Linux
- other (please specify)
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 in a YAML file using the schema and .vscode/settings.json configuration shown in the issue. Trace the completion handling for the allOf condition and compare the inserted text with the expected value; done means Tab inserts only , not the value followed by a duplicate key and value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode, yaml
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100