Vscode: [json]スキーマから参照されている外部スキーマが更新されていません

作成日 2018年03月07日  ·  3コメント  ·  ソース: microsoft/vscode

問題の種類

バグ

説明

セットアップ

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"
}

テスト1:Intellisenseがschema.json変更に気付く

プロパティの名前を変更colorcolorxschema.json - >で(希望)エラーtest.jsonMissing property "colorx".

:heavy_check_mark:その仕事です!

テスト2:Intellisenseはcolor-schema.json変更に気づきません

color-schema.json RedYellowに変更->エラーなし!

VSCodeを再起動すると、最終的にtest.json目的のエラーが発生します: Value is not accepted. Valid values: "Yellow".

:x:それは機能しません! (つまり、少なくともスキーマの依存関係が変更されるたびにVSCodeを再起動することなく)

VSコード情報

VSコードバージョン:コード1.20.1(f88bbf9137d24d36d968ea6b2911786bfe103002、2018-02-13T15:31:21.019Z)
OSバージョン:Linux x644.13.0-36-汎用


システム情報

|アイテム|値|
| --- | --- |
| CPU | Intel(R)Core(TM)i5-5200U CPU @ 2.20GHz(4 x 2194)|
|負荷(平均)| 1、1、1 |
|メモリ(システム)| 7.71GB(1.54GB空き)|
|プロセス引数| / usr / share / code / code --unity-launch |
|スクリーンリーダー|いいえ|
| VM | 0%|

拡張機能(6)

拡張子|作成者(切り捨て)|バージョン
--- | --- | ---
計算| aca | 2.0.0
QML | bbe | 1.0.0
Kotlin | mat | 1.5.0
cpptools | ms- | 0.15.0
vetur | oct | 0.11.7
列挙子| swi | 0.0.6


拡張なしで複製

bug json

最も参考になるコメント

このトピックに関する更新はありますか?

全てのコメント3件

おそらく再起動する必要はありませんが、 schema.json変更を加えると、スキームが更新されます。
しかし、はい、それはバグです。

@aeschlischema.jsonを変更しても、依存関係が再読み込みされないことを忘れてしまいました。 これを行う唯一の方法は、 $refタグを編集することです。

このトピックに関する更新はありますか?

このページは役に立ちましたか?
0 / 5 - 0 評価