[json] schema validation in a folder of a workspace stops working when more folders are added to it
See original GitHub issueDoes this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.66.2 (Tested in Insiders 1.67.0 with same results)
- OS Version: Windows 10 Education N x64 - 21H1
Steps to Reproduce:
- Create a Workspace and add a simple folder with a schema for JSON files defined in the folder settings.
schema-file.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Test",
"description": "An example schema",
"type": "object",
"properties": {
"requiredProperty": {
"type": "string"
}
},
"required": [
"requiredProperty"
]
}
-
Check that the
test.json
file is being validated correctly. -
Add a second folder to the workspace. In my test I added an empty folder in the same root as the workspace. The validation still works as expected.
-
Reload the window or close/open VSCode. The schema validation has stopped working as if the file did not match the
fileMatch
in the folder settings. Removing the second folder and reloading makes it work again.
As a note, if you open folder-A
directly in VSCode rather than the workspace, the validation works as expected.
Issue Analytics
- State:
- Created a year ago
- Reactions:9
- Comments:13
Top Results From Across the Web
Multiple level nesting in JSON schema validation with sub ...
AJV, the implementation that the tool you're using is a wrapper for, explicitly says that the location of files in the file system...
Read more >Visual Studio Code Tips and Tricks
Navigate between recently opened folders and workspaces ... .vscode folder. Workspace specific ... Create your own schema and validation in settings.json
Read more >Project Configuration - Nx
json files are located in each project's folder. Nx merges the two files to get each project's configuration. The following configuration creates build...
Read more >JSON File - Tableau Help
Note that schema levels in the Select Schema Levels dialog box do not map directly to the folder structure in the Data pane....
Read more >rush.json
path segment in the "$schema" field for all your Rush config files. ... Rush developers recommend a "category folder" model, where buildable project...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I noticed this is OS-specific too. On ubuntu 22 machine multi-root validation works fine but on windows 10 machine it doesn’t, on the same codebase.
Still have the bug on 1.71 on my machine.
Top: Workspace, Bottom: Folder