-
Notifications
You must be signed in to change notification settings - Fork 37.6k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugjsonJSON support issuesJSON support issuesverifiedVerification succeededVerification succeeded
Milestone
Description
VSCode Version: 1.53.0-insider (user setup)
Commit: 01089c0
Date: 2021-01-07T05:22:09.742Z
Electron: 11.1.0
Chrome: 87.0.4280.88
Node.js: 12.18.3
V8: 8.7.220.29-electron.0
OS: Windows_NT x64 10.0.19042
Steps to Reproduce:
- If we have two schema files that reference each other
test.schema.json
{
"$schema": "http://json-schema.org/draft-07/schema",
"oneOf": [
{
"type": "boolean"
},
{
"$ref": "generic/node.schema.json"
}
]
}
generic/node.schema.json
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"left": {
"$ref": "../test.schema.json"
},
"right": {
"$ref": "../test.schema.json"
}
}
}
- in a schema file that uses this we get an error about not being able to find the file
Problems loading reference 'file:///d%3A/projects/test.schema.json': Unable to load schema from 'd:\projects\test.schema.json': ENOENT: no such file or directory, open 'd:\projects\test.schema.json'.
which is one folder to high. - switching to
"$ref": "./test.schema.json"does not help because it is rightly a folder to low. - if both files are in the same folder the two cyclic refs work fine
- if you remove the second ref (right) it will also work so relative paths are also wirking
Not sure why this combination of things stoops it from working. I would be glad if this is fixable because it seemed to work in 1.51. Please let me know if you need any more information or I'm doing something wrong. Thanks.
Does this issue occur when all extensions are disabled?: Yes
Gary-Ascuy
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugjsonJSON support issuesJSON support issuesverifiedVerification succeededVerification succeeded