Skip to content

Commit f37c8aa

Browse files
committed
Updated comments for better understanding
1 parent f47a905 commit f37c8aa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

assets/json-schema-faker.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24165,11 +24165,11 @@ function extend() {
2416524165
var maxItems = value.maxItems;
2416624166

2416724167
/**
24168-
* Json schema faker fakes exactly maxItems # of elements in array
24169-
* Hence keeping maxItems as minimum and valid as possible for schema faking (to lessen faked items)
24170-
* We have enforced limit to maxItems as 20, set by Json schema faker option
24168+
* Json schema faker fakes exactly maxItems # of elements in array if present.
24169+
* Hence we're keeping maxItems as minimum and valid as possible for schema faking (to lessen faked items)
24170+
* Maximum allowed maxItems is set to 20, set by Json schema faker option.
2417124171
*/
24172-
// Override minItems to default (2) if no minItems present
24172+
// Override minItems to defaultMinItems if no minItems present
2417324173
if (typeof minItems !== 'number' && maxItems && maxItems >= optionAPI('defaultMinItems')) {
2417424174
minItems = optionAPI('defaultMinItems');
2417524175
}
@@ -24179,7 +24179,7 @@ function extend() {
2417924179
maxItems = minItems;
2418024180
}
2418124181

24182-
// If no maxItems is defined than override with default (2)
24182+
// If no maxItems is defined than override with defaultMaxItems
2418324183
typeof maxItems !== 'number' && (maxItems = optionAPI('defaultMaxItems'));
2418424184

2418524185
if (optionAPI('minItems') && minItems === undefined) {

0 commit comments

Comments
 (0)