Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using inline schema reference (# yaml-language-server: $schema) seems to not support relative paths #587

Closed
1 of 4 tasks
trondhindenes opened this issue Aug 30, 2021 · 3 comments · Fixed by #706
Closed
1 of 4 tasks

Comments

@trondhindenes
Copy link

Describe the bug

When using the # yaml-language-server: $schema notation in a yaml file, it kindof works if I give it a path to a local file:
# yaml-language-server: $schema=/home/what/somefolder/schema.json

however, if I point to a relative file, it doesn't seem to work:
# yaml-language-server: $schema=schema.json
# yaml-language-server: $schema=./schema.json
In this example, the schema file lives in the root of the open folder in vscode.

Expected Behavior

relative files should work

Current Behavior

Steps to Reproduce

s33 ablve

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)
@loozhengyuan
Copy link

In my case, it works but it is relative to the file instead of the repository root.

@evidolob
Copy link
Collaborator

@trondhindenes @loozhengyuan Are right relative paths is calculated from yaml file path, not from workspace root path

@trondhindenes
Copy link
Author

thanks. maybe that's something that could be clarified in the docs, I don't think it's mentioned at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants