Skip to content

Commit 70a61b1

Browse files
authored
normalize body array instead of returning literal (#1066)
1 parent c0eba4b commit 70a61b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/docusaurus-plugin-openapi-docs/src/openapi/createRequestExample.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export const sampleRequestFromSchema = (schema: SchemaObject = {}): any => {
181181
return items?.oneOf.map((item: any) => sampleRequestFromSchema(item));
182182
}
183183

184-
return [sampleRequestFromSchema(items)];
184+
return normalizeArray(sampleRequestFromSchema(items));
185185
}
186186

187187
if (schemaCopy.enum) {

0 commit comments

Comments
 (0)