Skip to content

Commit 17798c4

Browse files
committed
fix: added minProperties option for partial object
1 parent 1df66f6 commit 17798c4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb-safe-query",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"description": "this package will help to make mongodb query safer",
55
"main": "lib/index.js",
66
"scripts": {

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const fields = (fieldKeys: string[]) => {
1414
for (const fieldKey of fieldKeys) {
1515
objectFields[fieldKey] = fieldPossibleValues();
1616
}
17-
return Type.Partial(Type.Object(objectFields));
17+
return Type.Partial(Type.Object(objectFields, { minProperties: 1 }));
1818
};
1919

2020
const filterStructureSchema = (

0 commit comments

Comments
 (0)