@@ -23620,9 +23620,9 @@ function extend() {
23620
23620
23621
23621
var ALL_TYPES = ['array', 'object', 'integer', 'number', 'string', 'boolean', 'null'];
23622
23622
var MOST_NEAR_DATETIME = 2524608000000;
23623
- var MIN_INTEGER = -100000000 ;
23624
- var MAX_INTEGER = 100000000 ;
23625
- var MIN_NUMBER = -100 ;
23623
+ var MIN_INTEGER = 0 ;
23624
+ var MAX_INTEGER = 10000 ;
23625
+ var MIN_NUMBER = 0 ;
23626
23626
var MAX_NUMBER = 100;
23627
23627
var env = {
23628
23628
ALL_TYPES: ALL_TYPES,
@@ -24261,20 +24261,15 @@ function extend() {
24261
24261
return generated > 0 ? Math.floor(generated) : Math.ceil(generated);
24262
24262
};
24263
24263
24264
- var LIPSUM_WORDS = ('Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore'
24265
- + ' et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea'
24266
- + ' commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla'
24267
- + ' pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est'
24268
- + ' laborum').split(' ');
24269
24264
/**
24270
- * Generates randomized array of single lorem ipsum words.
24265
+ * This will always return "string" as a value instead of Lorem text.
24266
+ * It is used to generate a value for the "string" type.
24271
24267
*
24272
24268
* @param length
24273
24269
* @returns {Array.<string>}
24274
24270
*/
24275
24271
function wordsGenerator(length) {
24276
- var words = random.shuffle(LIPSUM_WORDS);
24277
- return words.slice(0, length);
24272
+ return ['string'];
24278
24273
}
24279
24274
24280
24275
// fallback generator
@@ -24452,6 +24447,8 @@ function extend() {
24452
24447
minProps = Math.max(optionalsProbability === null || additionalProperties ? random.number(fillProps ? 1 : 0, max) : 0, min);
24453
24448
}
24454
24449
24450
+ let propertyCount = 0;
24451
+
24455
24452
while (fillProps) {
24456
24453
if (!(patternPropertyKeys.length || allowsAdditional)) {
24457
24454
break;
@@ -24490,7 +24487,13 @@ function extend() {
24490
24487
current += 1;
24491
24488
}
24492
24489
} else {
24493
- const word = get(requiredProperties) || (wordsGenerator(1) + hash());
24490
+ /*
24491
+ This will generate a key_0, key_1, etc. for any additional properties, instead of
24492
+ using a random word. This is to ensure that the generated keys are predictable and
24493
+ consistent across generations.
24494
+ */
24495
+ const PREFIX_KEY = 'key_'
24496
+ const word = get(requiredProperties) || (PREFIX_KEY + propertyCount++);
24494
24497
24495
24498
if (!props[word]) {
24496
24499
props[word] = additionalProperties || anyType;
0 commit comments