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.
2 parents feb7e9b + 52c947d commit 8c6b1c4Copy full SHA for 8c6b1c4
src/main.ts
@@ -167,5 +167,7 @@ const generateExample = (operation: Operation): unknown => {
167
// currently only picks the first explicitly defined example
168
// we might want to steal rapidoc example generation at some point
169
// https://github.com/rapi-doc/RapiDoc/blob/ebda9d7b3ac0d1b35ee4210c4a493a01567f4c87/src/utils/schema-utils.js#L860
170
- return operation.getRequestBodyExamples()?.[0]?.examples?.[0]
+ const maybeExample = operation.getRequestBodyExamples()?.[0]?.examples?.[0]
171
+ //return maybeExample
172
+ return maybeExample?.value ? maybeExample?.value : maybeExample
173
}
0 commit comments