When a property is suggested from an enum inside an any-of, it is completed with any enum starting with the same name followed with dash or with matching name : a vs a-dash, a vs adash , a vs aaa etc...
Expected Behavior
The expected behavior is to suggest only the related property defined to the name (here the version 3.0.x)
Current Behavior
The suggestion list contains the version of both properties.
Describe the bug
When a property is suggested from an enum inside an any-of, it is completed with any enum starting with the same name followed with dash or with matching name : a vs a-dash, a vs adash , a vs aaa etc...
Expected Behavior
The expected behavior is to suggest only the related property defined to the name (here the version 3.0.x)
Current Behavior
The suggestion list contains the version of both properties.
Steps to Reproduce
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "http://bug-redhat-completion-with-dash.net", "properties": { "components": { "items": { "oneOf": [ { "properties": { "name": { "type": "string", "enum": [ "a-dash" ], "description": "a-dash", "default": "a-dash" }, "version": { "type": "string", "enum": [ "4.0.7", "4.0.6", "4.0.5" ], "default": "4.0.7" } }, "required": [ "name", "version" ], "title": "a-dash" }, { "properties": { "name": { "type": "string", "enum": [ "a" ], "description": "a", "default": "a" }, "version": { "type": "string", "enum": [ "3.0.1", "3.0.2" ], "default": "3.0.1" } }, "required": [ "name", "version" ], "title": "a" } ] }, "type": "array", "properties": { "name": { "type": "string" }, "version" : { "type": "string" } }, "required": [ "name", "version" ] } } }
Environment