I tried to make the change as backwards compatible as possible by adding a new, optional schemaService param to findLinks.
This was important because the YAML language server delegates to findLinks, and I'm primarily interested in getting this functionality working over there.
I assumed that the fileExists check would be a requirement (i.e. links for non existent files would be a poor UX). It's only being ran for properties w/ format: uri-reference, so it shouldn't be much overhead, but I'm happy to remove if you disagree.
This PR adds logic to
findLinks
to create links for relative path names when the associated JSON schema is configured withformat: uri-reference
.Fixes: microsoft/vscode#128971 Unblocks: redhat-developer/vscode-yaml#559
A few notes:
I tried to make the change as backwards compatible as possible by adding a new, optional
schemaService
param tofindLinks
.This was important because the YAML language server delegates to
findLinks
, and I'm primarily interested in getting this functionality working over there.I assumed that the
fileExists
check would be a requirement (i.e. links for non existent files would be a poor UX). It's only being ran for properties w/format: uri-reference
, so it shouldn't be much overhead, but I'm happy to remove if you disagree.