Skip to content

Commit 867481c

Browse files
authored
Support Integers in Response sample (#2592)
1 parent fc8065b commit 867481c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/nervous-sheep-pay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@gitbook/react-openapi': patch
3+
---
4+
5+
Support Integers in Response example

packages/react-openapi/src/generateSchemaExample.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function generateSchemaExample(
7979
return 'text';
8080
}
8181

82-
if (schema.type === 'number') {
82+
if (schema.type === 'number' || schema.type === 'integer') {
8383
return schema.default || 0;
8484
}
8585

0 commit comments

Comments
 (0)