docs(core): show default values for boolean options in executor schema explorer (#20765)

This commit is contained in:
Jack Hsu 2023-12-14 09:01:19 -05:00 committed by GitHub
parent 0392e0d6b8
commit 80a987ee7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -275,7 +275,7 @@ function generateJsonExampleForHelper(
return inferExample(
schema,
(x) => typeof x === 'boolean',
() => Example.of(true)
() => Example.of(schema.default ?? true)
);
} else if (type === 'integer' || type === 'number') {
return inferExample(