Skip to content

Commit df1e4f0

Browse files
authored
Change mock json to use alwaysFakeOptionals=false
Why: For some complex schemas, the mock library hangs. This is possibly because of a bug leading to an infinite loop, or more probably because the nature of the schema leading to exponential amount of optional fields to be generated Setting alwaysFakeOptionals to false fixes this issue for the schema that caused the error
1 parent f4c6692 commit df1e4f0

File tree

1 file changed

+1
-1
lines changed
  • frontend/src/components/Topics/Topic/SendMessage

1 file changed

+1
-1
lines changed

frontend/src/components/Topics/Topic/SendMessage/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import AjvDraft4 from 'ajv-draft-04';
1212
import addFormats from 'ajv-formats';
1313

1414
jsf.option('fillProperties', false);
15-
jsf.option('alwaysFakeOptionals', true);
15+
jsf.option('alwaysFakeOptionals', false);
1616
jsf.option('failOnInvalidFormat', false);
1717

1818
const generateValueFromSchema = (preferred?: SerdeDescription) => {

0 commit comments

Comments
 (0)