You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IntelliSence shows just one of two oneOf branches when both should be shown. oneOf branches:
a branch with a single-valued enum with some value (referred later as {{value}})
a branch with an object with a property named as {{value}}
Note: the same applies for anyOf too.
Expected Behavior
Both branches suggested in IntelliSence.
Current Behavior
A branch with a single-valued enum suggested.
Steps to Reproduce
Create schema schema.json with this content:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "array",
"items": {
"oneOf": [
{
"$comment": "A branch with a single-valued enum which is shown in IntelliSense suggestions",
"type": "string",
"enum": [
"something"
]
},
{
"$comment": "A branch with a single-valued enum which is hidden from IntelliSense suggestions",
"type": "object",
"properties": {
"something": {
"$comment": "Note that enum value 'something' named the same as this property, which is the source of an issue",
"title": "something",
"default": "default"
}
},
"additionalProperties": false
}
]
}
}
Create test.yaml file and refer inside it to schema.json:
# yaml-language-server: $schema=schema.json
- # cursor is right before the hash sign
Press Ctrl+Space and get just one oneOf branch suggested.
Environment
Windows
Mac
Linux
other (please specify)
The text was updated successfully, but these errors were encountered:
Describe the bug
IntelliSence shows just one of two
oneOf
branches when both should be shown.oneOf
branches:enum
with some value (referred later as{{value}}
){{value}}
Note: the same applies for
anyOf
too.Expected Behavior
Both branches suggested in IntelliSence.
Current Behavior
A branch with a single-valued
enum
suggested.Steps to Reproduce
schema.json
with this content:test.yaml
file and refer inside it toschema.json
:Ctrl+Space
and get just oneoneOf
branch suggested.Environment
The text was updated successfully, but these errors were encountered: