ajv-validator / ajv-validator/ajv-cli

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

Đang mở
#251 3 bình luận 2 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
316
Fork
77
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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`

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.