Describe the bug
Cmd-clicking $ref links to other schemas using dot-prefixed relative paths used to work for links to schemas in other files, but now only works for links to other schemas within the same file.
Additionally, the VS Code built-in "Go To Definition" command (shortcut: F12) fails for all $ref links (shows "No definition found", even for local links which do still allow Cmd-click behaviour.
No relevant output is shown in the developer console or the YAML Support Output category, except in the latter on extension host startup:
[Error] (node:68398) [DEP0169] DeprecationWarning: url.parse() behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for url.parse() vulnerabilities. (Use "Code Helper (Plugin) --trace-deprecation ..." to show where the warning was created)
Expected Behavior
Valid relative dot-prefixed (whether ./ or ../) $ref links to schemas in other local files in the trusted workspace should be able to be followed using Cmd-click, and ideally also using VS Code's built-in "Go To Definition" command.
Current Behavior
Valid $ref relative and absolute links to other local files (including within the same trusted folder) are not resolved and do not get underline formatting, and Cmd-clicking has no effect.
Links can be made to partially work like this:
file://./other-file.yaml
or file://./../../../other-file.yaml
But this seems to be native VS Code behaviour and completely ignores the #/ part of the $ref so it's not really useful.
Steps to Reproduce
- Create the below 2 files in the same folder open in VS Code.
- Attempt to Cmd-click the different
$ref links; the internal one should navigate to the relevant schema, the relative file link should appear without an underline and not be Cmd-clickable.
schema.yaml
# yaml-language-server: $schema=http://json-schema.org/draft-07/schema#
components:
schemas:
Item:
allOf:
- $ref: './support-models.yaml#/components/schemas/Object'
- $ref: '#/components/schemas/Item_Definition'
Item_Definition:
type: object
support-models.yaml
# yaml-language-server: $schema=http://json-schema.org/draft-07/schema#
components:
schemas:
Object:
type: object
Environment
macOS Tahoe 26.5.1
VS Code:
Version: 1.123.0
Commit: 6a44c352bd24569c417e530095901b649960f9f8
Date: 2026-06-03T11:29:03+02:00
Electron: 42.2.0
ElectronBuildId: 14159160
Chromium: 148.0.7778.97
Node.js: 24.15.0
V8: 14.8.178.14-electron.0
OS: Darwin arm64 25.5.0
redhat.vscode-yaml:
Any version, but tested with:
1.24.2026061109
1.23.0
1.12.0
Describe the bug
Cmd-clicking
$reflinks to other schemas using dot-prefixed relative paths used to work for links to schemas in other files, but now only works for links to other schemas within the same file.Additionally, the VS Code built-in "Go To Definition" command (shortcut: F12) fails for all
$reflinks (shows "No definition found", even for local links which do still allow Cmd-click behaviour.No relevant output is shown in the developer console or the YAML Support Output category, except in the latter on extension host startup:
[Error] (node:68398) [DEP0169] DeprecationWarning: url.parse() behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for url.parse() vulnerabilities. (Use "Code Helper (Plugin) --trace-deprecation ..." to show where the warning was created)Expected Behavior
Valid relative dot-prefixed (whether
./or../)$reflinks to schemas in other local files in the trusted workspace should be able to be followed using Cmd-click, and ideally also using VS Code's built-in "Go To Definition" command.Current Behavior
Valid
$refrelative and absolute links to other local files (including within the same trusted folder) are not resolved and do not get underline formatting, and Cmd-clicking has no effect.Links can be made to partially work like this:
file://./other-file.yamlor
file://./../../../other-file.yamlBut this seems to be native VS Code behaviour and completely ignores the
#/part of the$refso it's not really useful.Steps to Reproduce
$reflinks; the internal one should navigate to the relevant schema, the relative file link should appear without an underline and not be Cmd-clickable.schema.yamlsupport-models.yamlEnvironment
macOS Tahoe 26.5.1
VS Code:
redhat.vscode-yaml:
Any version, but tested with:
1.24.20260611091.23.01.12.0