vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

Auto-complete for an object only inserts one of the required properties and it's not the 1st one

Open Ark-kun opened this issue 3 years ago • 0 comments

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.

Schema: https://raw.githubusercontent.com/Cloud-Pipelines/component_spec_schema/stable/component_spec.json_schema.json,

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

  • [x] Windows
  • [ ] Mac
  • [ ] Linux
  • [ ] other (please specify)

Ark-kun avatar May 30 '21 01:05 Ark-kun