vscode-yaml
vscode-yaml copied to clipboard
`allOf` with condition breaks completion
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
- [x] Linux
- [ ] other (please specify)