Skip to content

Commit 8c6b1c4

Browse files
authored
Merge pull request #17 from grid-x/fix/superfluous-value-tag
fix: Snippet creation additional wrapper SOL-3708
2 parents feb7e9b + 52c947d commit 8c6b1c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,5 +167,7 @@ const generateExample = (operation: Operation): unknown => {
167167
// currently only picks the first explicitly defined example
168168
// we might want to steal rapidoc example generation at some point
169169
// https://github.com/rapi-doc/RapiDoc/blob/ebda9d7b3ac0d1b35ee4210c4a493a01567f4c87/src/utils/schema-utils.js#L860
170-
return operation.getRequestBodyExamples()?.[0]?.examples?.[0]
170+
const maybeExample = operation.getRequestBodyExamples()?.[0]?.examples?.[0]
171+
//return maybeExample
172+
return maybeExample?.value ? maybeExample?.value : maybeExample
171173
}

0 commit comments

Comments
 (0)