diff --git a/lib/types/object.js b/lib/types/object.js index cae6adb844ce975c3508c012484c46718d08ec8d..9d9a5992689acac315672ccaa1c1ff630ecc2d5f 100644 Binary files a/lib/types/object.js and b/lib/types/object.js differ diff --git a/spec/core/types/objects.json b/spec/core/types/objects.json index 302be1885da31c4c3f63fa2aaaff9415b0c15890..9ba7ae1a3cd3ead784fc573b66379712516e0008 100644 --- a/spec/core/types/objects.json +++ b/spec/core/types/objects.json @@ -25,6 +25,33 @@ } }, "valid": true + }, + { + "description": "should handle minProperties", + "schema": { + "type": "object", + "properties": { + "x": { "type": "string" }, + "y": { "type": "string" } + }, + "required": ["x", "y"], + "minProperties": 2 + }, + "valid": true + }, + { + "description": "should handle maxProperties", + "schema": { + "type": "object", + "patternProperties": { + "a+": { "type": "string" }, + "b+": { "type": "string" }, + "c+": { "type": "string" } + }, + "minProperties": 1, + "maxProperties": 2 + }, + "valid": true } ] }