redhat-developer / redhat-developer/vscode-yaml
Auto-complete for an object only inserts one of the required properties and it's not the 1st one
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Describe the bug
The schema definition has multiple required properties. Auto-complete for an object only inserts one of the required properties and it's not the 1st one in the list.
Relevant schema definition:
"IfPlaceholder": {
"description": "Represents the command-line argument placeholder that will be replaced at run-time by a boolean value specifying whether the caller has passed an argument for the specified optional input.",
"type": "object",
"required": ["if"],
"properties": {
"if" : {
"type": "object",
"required": ["cond", "then"],
"properties": {
"cond": {"$ref": "#/definitions/IfConditionArgumentType"},
"then": {"$ref": "#/definitions/StringOrPlaceholder"},
"else": {"$ref": "#/definitions/StringOrPlaceholder"}
}
}
}
},
Steps to Reproduce
Use TAB for auto-complete if:
implementation:
container:
image: alpine
command:
- if<TAB>
Current Behavior
- if:
then:
-
Expected Behavior
- if:
cond: ???
then:
-
Environment
- Windows
- Mac
- Linux
- other (please specify)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in VS Code using the linked component schema and the YAML command example, then trace the autocomplete handling for object properties with multiple required fields. Done means completing if inserts both cond and then, with cond appearing first as shown in the expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode, yaml
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100