ajv-validator / ajv-validator/ajv

Schema validation - A Default value not matching the type of property does not error on validateSchema/Compile

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

説明

**What version of Ajv are you using? Does the issue happen if you use the latest version?**
V7.0.3 and yes it happens for previous versions too.

**Ajv options object**
```javascript
{ useDefaults: true }
```

**JSON Schema**
```json
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"properties": {
"test": {
"type": "boolean",
"default": "mp3"
}
},
"additionalProperties": false
}
```

**Your code**
https://runkit.com/parora611/ajv-issue

**What results did you expect?**
Error should have been thrown on compile.

**Are you going to resolve the issue?**
Not sure as of now.

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

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

評価

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

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

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