Skip to content

YAML autocompletion and validation works only for the first YAML definition in a file (schema through modeline) #1066

@ma-ble

Description

@ma-ble

Describe the bug

YAML autocompletion and validation works as expected for the first YAML definition in the file.

Screenshot 2024-10-23 at 14 50 52

Validation works also as expected.

Screenshot 2024-10-23 at 14 53 54

When I try to add another YAML definition into the same file, there is no autocompletion or validation available.

Screenshot 2024-10-23 at 14 51 56 Screenshot 2024-10-23 at 14 53 26

Expected Behavior

It would be great if you can add multiple resources with the same or different schema in the same file.

Steps to Reproduce

My schema "test.schema.json" is

{
  "properties": {
    "my_key": {
      "description": "My string",
      "enum": ["my_value"],
      "type": "string"
    }
  },
  "type": "object"
}

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions