ajv-validator / ajv-validator/ajv-cli

ajv-cli fails when a json schema specifies draft-2020-12 despite recognizing or ignoring others

オープン
#251 コメント 3 件 リアクション 2 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
316
フォーク
77
PR マージ指標
30日以内にマージされた PR はありません

説明

If a given JSON schema specifies `$schema` as `"https://json-schema.org/draft/2020-12/schema"`, i.e. `draft-2020-12`, you must manually specify `--spec=draft2020` to `ajv-cli`, or else you receive the following error:

```
error: no schema with key or ref "https://json-schema.org/draft/2020-12/schema"
```

However, if the value is seemingly anything else, there is no issue; presumably, it uses the default schema `draft-07`.

- `"http://json-schema.org/draft-04/schema#"`
- `"http://json-schema.org/draft-07/schema#"`
- `"http://json-schema.org/draft-08/schema#"` (this link does not exist)
- `"http://json-schema.org/draft/2019-09/schema#"`
- `"http://json-schema.org/draft-2019-09/schema#"` (also does not exist)
- `"asiniagdading"`
- `0`

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。