ajv-validator / ajv-validator/ajv

Maybe make the first added meta default (however it is added) (README draft-04 instructions cause warnings)

未關閉
#1,018 6 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
docs
主要語言
TypeScript
星號
14.8k
分支
1k
PR 合併指標
30 天內沒有已合併 PR

描述

When following the instructions for validating against draft-04 multiple warnings are thrown in the console every time. Might just be a documentation issue as putting `meta: false` or using `schemaId: 'auto'` in the configuration options prevents these warnings.

**What version of Ajv are you using? Does the issue happen if you use the latest version?**
6.10.0
Yes, this happens on latest

**Your code**

```javascript
const Ajv = require('ajv');
const ajv = new Ajv({schemaId: 'id'});
ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json'));
```

**Warning messages**
```
schema $id ignored http://json-schema.org/draft-07/schema#
schema $id ignored http://json-schema.org/draft-07/schema#
schema $id ignored http://json-schema.org/draft-07/schema#
```

**What results did you expect?**
No warnings when following the instructions for using draft-04

**Are you going to resolve the issue?**
No

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。