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
Documentation that is shown when hovering properties is misleading in some cases related to anyOf properties. While correct documentation is shown for valid YAML, the user sees misleading information while in the process of writing YAML. This is problematic for cases where a user relies on auto-completion and hover documentation to discover available properties.
When hovering child, hover documentation indicates that there are two choices, FirstChoice and SecondChoice.
Current Behavior
When hovering child, documentation for FirstChoice is shown, without any indication that there are other possibilities.
Note that the hover documentation works as expected as soon as it is clear which anyOf choice applies. For example, the following YAML will show documentation for SecondChoice when hovering child:
# yaml-language-server: $schema=bugreport.schema.jsonchild:
choice: second
Steps to Reproduce
Store the above schema and example YAML in files, make sure the schema reference matches the schema file name
Hover child
Environment
Windows
VS Code 1.68.0
YAML Extension 1.8.0
The text was updated successfully, but these errors were encountered:
Describe the bug
Documentation that is shown when hovering properties is misleading in some cases related to
anyOf
properties. While correct documentation is shown for valid YAML, the user sees misleading information while in the process of writing YAML. This is problematic for cases where a user relies on auto-completion and hover documentation to discover available properties.Schema
Side note: This schema was generated using Pydantic with the below Pydantic model.
Example YAML
This is intentionally incomplete, assume the user is currently in the process of writing it.
Expected Behavior
When hovering
child
, hover documentation indicates that there are two choices,FirstChoice
andSecondChoice
.Current Behavior
When hovering
child
, documentation forFirstChoice
is shown, without any indication that there are other possibilities.Note that the hover documentation works as expected as soon as it is clear which
anyOf
choice applies. For example, the following YAML will show documentation forSecondChoice
when hoveringchild
:Steps to Reproduce
child
Environment
The text was updated successfully, but these errors were encountered: