mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
Support Integers in Response sample (#2592)
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Support Integers in Response example
|
||||||
@@ -79,7 +79,7 @@ export function generateSchemaExample(
|
|||||||
return 'text';
|
return 'text';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (schema.type === 'number') {
|
if (schema.type === 'number' || schema.type === 'integer') {
|
||||||
return schema.default || 0;
|
return schema.default || 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user