From c8cde4ec4a1882d0e125306ca1c8cfd845be1159 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alvaro=20Cabrera=20Dur=C3=A1n?= <pateketrueke@gmail.com>
Date: Wed, 9 Oct 2019 23:11:51 -0500
Subject: [PATCH] Generate enough props from min to all-props; fix

---
 src/types/object.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/types/object.js b/src/types/object.js
index e6f18498..f4e0f2e4 100644
--- a/src/types/object.js
+++ b/src/types/object.js
@@ -50,7 +50,7 @@ function objectType(value, path, resolve, traverseCallback) {
   const fixedProbabilities = optionAPI('alwaysFakeOptionals') || optionAPI('fixedProbabilities') || false;
   const ignoreProperties = optionAPI('ignoreProperties') || [];
 
-  const min = Math.max(value.minProperties || 0, requiredProperties.length);
+  const min = Math.max(value.minProperties || 0, random.number(requiredProperties.length, allProperties.length));
   const max = value.maxProperties || (allProperties.length + (allowsAdditional ? random.number(1, 5) : 0));
 
   let neededExtras = Math.max(0, min - requiredProperties.length);
-- 
GitLab