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

Plugin does not work with strict mode

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

Mô tả

**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.

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.