You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,8 @@ Available options:
64
64
Don't include `readOnly` object properties
65
65
-**skipWriteOnly** - `boolean`
66
66
Don't include `writeOnly` object properties
67
+
-**disableNonRequiredAutoGen** - `boolean`
68
+
Don't auto generate sample for non-required object properties when the schema hasn't explicit example nor default value
67
69
-**quiet** - `boolean`
68
70
Don't log console warning messages
69
71
-**spec** - whole specification where the schema is taken from. Required only when schema may contain `$ref`. **spec** must not contain any external references
Copy file name to clipboardExpand all lines: src/samplers/number.js
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,7 @@
1
-
exportfunctionsampleNumber(schema){
1
+
exportfunctionsampleNumber(schema,options={}){
2
+
if(options.omissible){
3
+
returnnull;
4
+
}
2
5
letres=0;
3
6
if(typeofschema.exclusiveMinimum==='boolean'||typeofschema.exclusiveMaximum==='boolean'){//legacy support for jsonschema draft 4 of exclusiveMaximum/exclusiveMinimum as booleans
0 commit comments