Data:
{
"$schema": "test_schema.json",
"name": "Hi"
}
Schema:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://example.com/example",
"title": "test",
"properties": {
"name": {
"type": "string"
}
},
"additionalProperties": false
}
VS Codes built in JSON feature markes a “problem” (yellow underline below "$schema"
) in my data. VS Code validates the data with the schema referenced in the data. So the reference to the schema itself breaks the rules of the schema it is referencing to. Property $schema is not allowed.
Removing "additionalProperties": false
from the schema solves it. But I want to keep it. Is this a VS Code bug or did I do something wrong?