We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70c4182 commit 23cedd2Copy full SHA for 23cedd2
.changeset/two-colts-help.md
@@ -0,0 +1,5 @@
1
+---
2
+"@gitbook/react-openapi": patch
3
4
+
5
+Hide deprecated properties in examples
packages/react-openapi/src/generateSchemaExample.ts
@@ -166,6 +166,11 @@ const getExampleFromSchema = (
166
// But if `emptyString` is set, we do want to see some values.
167
const makeUpRandomData = !!options?.emptyString;
168
169
+ // If the property is deprecated we don't show it in examples.
170
+ if (schema.deprecated) {
171
+ return undefined;
172
+ }
173
174
// Check if the property is read-only/write-only
175
if (
176
(options?.mode === 'write' && schema.readOnly) ||
0 commit comments