Bug
color-schema.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"validColors": {
"enum": ["Red"]
}
}
schema.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"color": { "$ref": "color-schema.json#/validColors" }
},
"required": ["color"]
}
test.json
{
"$schema": "./schema.json",
"color": "Red"
}
schema.json
Rename the property color
to colorx
in schema.json
-> (Desired) error in test.json
: Missing property "colorx".
:heavy_check_mark: That work's!
color-schema.json
Change Red
to Yellow
in color-schema.json
-> no errors!
Restarting VSCode finally gives the desired error in test.json
: Value is not accepted. Valid values: "Yellow".
:x: That doesn't work! (i. e. at least without restarting VSCode after each schema dependency change)
VS Code version: Code 1.20.1 (f88bbf9137d24d36d968ea6b2911786bfe103002, 2018-02-13T15:31:21.019Z)
OS version: Linux x64 4.13.0-36-generic
System Info
|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz (4 x 2194)|
|Load (avg)|1, 1, 1|
|Memory (System)|7.71GB (1.54GB free)|
|Process Argv|/usr/share/code/code --unity-launch|
|Screen Reader|no|
|VM|0%|
Extensions (6)
Extension|Author (truncated)|Version
---|---|---
calculate|aca|2.0.0
QML|bbe|1.0.0
Kotlin|mat|1.5.0
cpptools|ms-|0.15.0
vetur|oct|0.11.7
enumerator|swi|0.0.6
Reproduces without extensions
You probably don't need to restart, but making a change in schema.json
should update the scheme.
But yes, it's a bug.
@aeschli: Forgot to mention that changing schema.json
doesn't reload its dependencies. The only way to do this is editing the $ref
tag.
Any update on this topic?
Most helpful comment
Any update on this topic?