redhat-developer / redhat-developer/vscode-yaml

There should be a way to specify Schema file that is part of the project

Open
#123 6 comments 21 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
829
Forks
260
Avg merge
5h 43m
Merged PRs (30d)
1

Description

During active development, especially for a small or local or private project there is no justification to post schema to some hosted location, like Schema store.

yaml.schemas settings should allow specifying ${workspaceFolder} placeholder in file:///local-path or, ideally, just recognize relative path notation

For example: /schemas/my-schema.json should mean that schema file is located in file:///${workspaceFolder}/schemas/my-schema.json

The only way it works right now is if we specify absolute path of the schema file on local file system in Worspace settings file, but it doesn't work in generall, because different developers / dev boxes have different folder names/structure.

VSCode-yaml extension v0.0.16
VSCode: (windows portable install)
Version: 1.27.2
Commit: f46c4c469d6e6d8c46f268d1553c5dc4b475840f
Date: 2018-09-12T16:17:45.060Z
Electron: 2.0.7
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the handling of the yaml.schemas setting and how schema file URLs are resolved relative to workspace settings. Verify the behavior with a workspace containing schemas/my-schema.json; done means ${workspaceFolder} or the requested relative path resolves consistently without machine-specific absolute paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.