redhat-developer / redhat-developer/vscode-yaml

Clearer documentation for relative path and wildcards in README.md

Open
#1,051 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is your enhancement related to a problem? Please describe.

It took me a bit to figure out how to use a relative path and wildcards in settings.json; I found the documentation in README.md unclear about this.

My working solution

"yaml.schemas": {
    "./path/to/schemas/project.json": [
        "/path/to/projects/**/*.yaml",
    ]
}
Describe the solution you would like

The README.md should contain clear instructions and an easy to understand example.

Additional context

Here is what I would add, after the On Mac/Linux with full path: sample code:

To provide a relative path,

  • for the schema, specify it from the root folder starting with a dot: ./path/from/root/folder;
  • for the yaml files, specify it from the root folder without the dot: /path/from/root/folder.
    You can use wildcards: in the example, any of the two paths would work with the file my_project.yaml.
"yaml.schemas": {
   "./path/to/schemas/project.json": [
       "/path/to/projects/subfolder/my_project.yaml",
       "/path/to/projects/**/*.yaml",
   ]
}

Please provide feedback on this change, and tell me if I should take care of a pull request.

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

Open README.md and find the section containing the “On Mac/Linux with full path” sample. Clarify relative schema and YAML paths and add the proposed wildcard example; done means the README explains the path rules and shows an understandable settings.json configuration.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.