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

YAML `---` for "Multiple documents within a single stream" doesn't work [VSC YAML Plugin]

Open vorburger opened this issue 1 year ago • 0 comments

I wrote my first trivial JSON schema enola.schema.jsonc, like this:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.enola.dev/json-schema/enola_meta.schema.jsonc",
  "title": "Enola.dev Meta Model",
  "description": "See https://docs.enola.dev",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "name": {
      "type": "string",
      "description": "Short technical name of this Type."
    }
  },
  "required": ["name"]
}

Then I wrote an test.yaml file using that schema, like this:

# yaml-language-server: $schema=enola.schema.jsonc

name: enola.dev/url
doc: enola.md#URL

---
name: enola.dev/id
doc: enola.md#ID

Current Behavior

It does put a "red squiggle" on the first doc: enola.md#URL but not on the second doc: enola.md#ID.

In fact the 2nd name: enola.dev/id doesn't have the "hover" with the descriptionfrom the schema either.

It looks like the YAML --- syntax for "multiple documents within a single stream" isn't supported / doesn't work?

Expected Behavior

I expected it to flag the doc attribute as red in both my URL and ID attributes.

vorburger avatar Dec 10 '23 18:12 vorburger