Describe the bug
I have used the below schema. This schema has a property (foo) that is required, an array and have default values.
When I am in a new file that uses this schema and press Ctrl + Space to see every required property for my schema, I only see ${1} for my array:
When I press Tab to get this schema, I only get hello (the default value for my string property) in the spaces of the array.
This would therefore require any user of my schema to notice that the default value is completly wrong and then manuelly correct them.
The property foo in the below Schema exists in multiple ways, because I tested if one of them works (none work).
The normal way how I use default values with arrays is foo-two-default.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"bar": {
"type": "string",
"default": "hello"
},
"num": {
"type": "number",
"default": "42"
},
"foo-two-default": {
"type": "array",
"default": [
"foo-two-default"
],
"items": {
"type": "string",
"default": "foo-two-default"
}
},
"foo-default-in-items": {
"type": "array",
"items": {
"type": "string",
"default": "foo-default-in-items"
}
},
"foo-default-outside": {
"type": "array",
"default": [
"foo-default-outside"
],
"items": {
"type": "string"
}
}
},
"required": [
"foo-two-default",
"foo-default-in-items",
"foo-default-outside",
"bar",
"num"
],
"title": "dummy"
}
Expected Behavior
I would expect that my array default values will be given normally as normal string or number properties are.
Current Behavior
- In the preview, some placeholder values
${1} are visible
- In the inital creation of the yaml document, the default value of my string value will be used.
- When deleting the wrong default value and pressing CTRL + Space, the correct default values are found and rendered (OK)
Steps to Reproduce
- Use above schema in VS Code for any file
- In the file: Press Ctrl + Space and see the preview
- Use the preview to create the YAML content

Environment
Describe the bug
I have used the below schema. This schema has a property (foo) that is required, an array and have default values.
When I am in a new file that uses this schema and press Ctrl + Space to see every required property for my schema, I only see
${1}for my array:When I press Tab to get this schema, I only get
hello(the default value for my string property) in the spaces of the array.This would therefore require any user of my schema to notice that the default value is completly wrong and then manuelly correct them.
The property foo in the below Schema exists in multiple ways, because I tested if one of them works (none work).
The normal way how I use default values with arrays is
foo-two-default.{ "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "bar": { "type": "string", "default": "hello" }, "num": { "type": "number", "default": "42" }, "foo-two-default": { "type": "array", "default": [ "foo-two-default" ], "items": { "type": "string", "default": "foo-two-default" } }, "foo-default-in-items": { "type": "array", "items": { "type": "string", "default": "foo-default-in-items" } }, "foo-default-outside": { "type": "array", "default": [ "foo-default-outside" ], "items": { "type": "string" } } }, "required": [ "foo-two-default", "foo-default-in-items", "foo-default-outside", "bar", "num" ], "title": "dummy" }Expected Behavior
I would expect that my array default values will be given normally as normal string or number properties are.
Current Behavior
${1}are visibleSteps to Reproduce
Environment