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

Clearer documentation for relative path and wildcards in README.md #1051

Open
GabrieleLabanca opened this issue Aug 29, 2024 · 0 comments
Open

Comments

@GabrieleLabanca
Copy link

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.

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

No branches or pull requests

1 participant