Use schema.example if defined, even if value is falsy (#2370)

This commit is contained in:
Samy Pessé
2024-07-05 16:34:48 +02:00
committed by GitHub
parent 9b1762d2ab
commit aaf5793cb7
@@ -19,7 +19,7 @@ export function generateSchemaExample(
return undefined;
}
if (schema.example) {
if (typeof schema.example !== 'undefined') {
return schema.example;
}