Support Integers in Response sample (#2592)

This commit is contained in:
vibhanshub
2024-11-28 14:19:37 +00:00
committed by GitHub
parent fc8065b7a8
commit 867481c66d
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@gitbook/react-openapi': patch
---
Support Integers in Response example
@@ -79,7 +79,7 @@ export function generateSchemaExample(
return 'text';
}
if (schema.type === 'number') {
if (schema.type === 'number' || schema.type === 'integer') {
return schema.default || 0;
}