-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Description
No duplicate issue exists
- VSCode Version: 1.38.1
- OS Version: MacOS 10.13.6
Steps to Reproduce:
Open a new document.
Set language mode to JSON.
Provide the following content...
{
"$schema": "http://json-schema.org/draft-03/schema",
"type":"array",
"items": {}
}
items is incorrectly highlighted as invalid because it's an object.
This is incorrect, but is likely because the meta-schema is being parsed not as a draft-3 schema.
In draft-3, type would accept schemas as well as primitive types as strings.
This was removed in draft-4.
Given that it's not expected many people use draft-3, it may be preferable to not support draft-3 at all, and in stead indicate that draft-3 is not supported.
This case can be identified when loading a schema for a JSON document, and detecting that both $schema and id (not $id for draft-3) are "http://json-schema.org/draft-03/schema#"
Does this issue occur when all extensions are disabled?: Yes
FYI: I'm one of the core team on the JSON Schema spec itself.