mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 06:31:49 +00:00
OpenAPI: Skip non-required values when generating code examples
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-openapi': patch
|
||||
---
|
||||
|
||||
Skip non-required values when generating code examples
|
||||
@@ -77,5 +77,6 @@ function generateBody(method: string, schema: ResolvedSchema): unknown {
|
||||
return sample(schema as object, {
|
||||
skipReadOnly: method !== 'GET',
|
||||
skipWriteOnly: method === 'GET',
|
||||
skipNonRequired: true,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user