-
Notifications
You must be signed in to change notification settings - Fork 255
Description
Describe the bug
We rely on custom yaml configuration to setup particular systems. We validate these yaml files with json schema, and rely on the Intellisense/Autocompletion feature of this yaml extensions to expose the possible values, alongside a relevant description, since we have hundreds of values which need to be correct.
We recently had reports of developers that when accessing Intellisense (Control + Space ) , they suddenly had an empty box, with no longer the possible values.
Further investigation showed that the fault was on vscode auto-updating the YAML extension to 1.11 . Reverting to 1.10 succesfully restored functionality, but this is breaking workflows revolving around dynamic development environments, in the browser for example. Since we cannot specify required version in suggested workspace extensions ( .vscode/extensions.json), the remote environment will try to setup with the latest of every extensions - thus requiring a manual downgrade step.
Expected Behavior
Before 1.10
Current Behavior
From 1.11
Note that the validation aspect still works, despite the autocompletion issue :
Steps to Reproduce
- Create a workspace, where VSCode will validate yaml files using the demo schema below (in our case using
.vscode/settings.json). - Make sure you use the YAML extension version
1.10.1- may need downgrading on the extension page - Create a yaml file and test the validation and autocompletion
- Upgrade to
1.11and compare behaviours
⚙️ settings.json
{
"yaml.schemas": {
".\\custom_json_schema.json": "*.yaml",
}
}📝 Demonstration schema
{
"title": "Demonstration Schema",
"description": "Demonstrates Validation Glitch",
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"required": [
"string_example",
"array_example",
"array_enum_example"
],
"properties": {
"string_example": {
"title": "Constants for string",
"type": "string",
"description": "Shows behaviour when using a string with constants subschemas",
"oneOf": [
{
"const": "Option 1",
"description": "Sample Option 1",
"markdownDescription": "_Sample Option 1_"
},
{
"const": "Option 2",
"description": "Sample Option 2",
"markdownDescription": "_Sample Option 2_"
}
]
},
"array_example": {
"title": "Constants for array",
"type": "array",
"description": "Shows behaviour when using an array with constants subschemas",
"items": {
"type": "string",
"anyOf": [
{
"const": "Option 1",
"description": "Sample Option 1",
"markdownDescription": "_Sample Option 1_"
},
{
"const": "Option 2",
"description": "Sample Option 2",
"markdownDescription": "_Sample Option 2_"
}
]
}
},
"array_enum_example": {
"title": "Enum for array",
"type": "array",
"description": "Shows behaviour when using an enum with constants subschemas",
"items": {
"type": "string",
"enum": ["Option 1", "Option 2"]
}
}
}
}Environment
- Windows
- Mac
- Linux
- other (please specify)






