ajv-validator / ajv-validator/ajv-merge-patch

Plugin does not work with strict mode

未關閉
#51 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
47
分支
19
PR 合併指標
30 天內沒有已合併 PR

描述

**Describe the bug**
With ajv option set to strict mode the ajv-merge-patch package does not work. I receive the error:
`
strict mode: required property "value" is not defined at "#/properties/with/items/anyOf/0" (strictRequired)
`

**To Reproduce**
Steps to reproduce the behavior:
1. Set ajv schema option { strict: true }
2. Register the plugin
4. Run fastify
5. See error

**Expected behavior**
Package should work even with strict mode on

**Do you have a proposed solution?**
In this line a property is required which is not defined, after removing it locally everything worked as expected.
https://github.com/ajv-validator/ajv-merge-patch/blob/0a4c44f7daa09c6d00ac4abe5ec10c7bc4f6b214/keywords/patch.js#L19

**Additional context and screenshots**
Add any other context about the problem, and screenshots if applicable.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

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

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