Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
json-schema-faker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fork
json-schema-faker
Commits
467ffeb2
Commit
467ffeb2
authored
5 years ago
by
Jakob Olsson
Browse files
Options
Downloads
Patches
Plain Diff
hardcode generate max 1 entry for arrays
parent
6c728d04
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/types/array.js
+1
-1
1 addition, 1 deletion
src/types/array.js
with
1 addition
and
1 deletion
src/types/array.js
+
1
−
1
View file @
467ffeb2
...
...
@@ -83,7 +83,7 @@ function arrayType(value, path, resolve, traverseCallback) {
const
optionalsProbability
=
optionAPI
(
'
alwaysFakeOptionals
'
)
===
true
?
1.0
:
optionAPI
(
'
optionalsProbability
'
);
const
fixedProbabilities
=
optionAPI
(
'
alwaysFakeOptionals
'
)
||
optionAPI
(
'
fixedProbabilities
'
)
||
false
;
let
length
=
random
.
number
(
minItems
,
maxItems
,
1
,
5
);
let
length
=
random
.
number
(
minItems
,
maxItems
,
1
,
1
);
if
(
optionalsProbability
!==
false
)
{
length
=
Math
.
max
(
fixedProbabilities
...
...
This diff is collapsed.
Click to expand it.
Jakob Olsson
@jakob
mentioned in commit
7195eecb
·
5 years ago
mentioned in commit
7195eecb
mentioned in commit 7195eecbdc53945497483a8927768cadf7ec81d2
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment