-
Notifications
You must be signed in to change notification settings - Fork 255
Closed
redhat-developer/yaml-language-server
#1196Description
Describe the bug
When creating a new YAML File from scratch and using the autocompletion feature of the plugin, it genereates the right YAML for the following schema:
{
"$schema" : "http://json-schema.org/draft-07/schema#",
"type" : "object",
"properties" : {
"Test" : {
"type" : "object",
"properties" : {
"test" : {
"type" : "object",
"properties" : {
"foo" : {
"type" : "boolean",
"title" : "foo",
"default" : "false",
"examples" : [ "false" ]
}
},
"required" : [ "foo" ]
}
},
"required" : [ "test"]
}
},
"required" : [ "Test" ],
"description" : "test schema",
"additionalProperties" : false
}Later on, when you remove the foo tag and manually add it again, it suggests to add the boolean parameter as a string which is wrong:
If you change the default value of foo from "false" to false, then adding the field manually works as expected, but if you generate the new YAML from scratch, the value of foo will not be written anymore:
Expected Behavior
The value of foo should be written when generating a new YAML and foo should always be written as a boolean
Current Behavior
Foo is either written as as a string when manually adding the field or not written when generating a new YAML from scratch.
Steps to Reproduce
- "Link" the schema to the yaml file
- Generate a yaml from scratch
- Delete the foo tag and add it via autocompletion again
Environment
- Windows
- Mac
- Linux
- other (please specify)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done
