-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Property shows up multiple times in completions #829
Comments
@afscrome Here oneOf contains two properties and both name is spec.
So we can suggest user that all matching properties and used can pick the opt one |
In the VS Code JSON editor, this same schema only shows a single The wider context in which I encountered this I'm trying to use Backstage's object schema for it's
If using this schema in the VS Code JSON editor or Rider, the the auto completions come out as expected, and are easy to use, with no duplicate property names But when I use this same schema with the VS Code YAML extension , the auto completions become overwhelming with duplicates, duplicated, to the point of not being very useful. There are quite a few issues which I suspect are related, but I'm still trying to reduce them to a minimal repo |
@afscrome Let me check and get back to you ASAP |
Describe the bug
If a schema uses
anyOf
and multiple objects have a property with the same name, but different sets of required fields, then that property shows up twice in auto completion (see example schema below).Expected Behavior
In the below example,
spec
should only show in completions once.Current Behavior
The
spec
field is shown in completions twiceSteps to Reproduce
1.Create the below schema
2. Reference it in a yaml file
3. Start auto completion at the first character in the file
If you remove the
required
section in the second object, then completion correctly shows only onespec
completion.Environment
The text was updated successfully, but these errors were encountered: