Skip to content

Commit 81ee4cd

Browse files
committed
handle discriminators with no mapping as simply property
1 parent 297f914 commit 81ee4cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/docusaurus-plugin-openapi-docs/src/markdown/createSchema.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,9 @@ function createPropertyDiscriminator(
535535
return undefined;
536536
}
537537

538+
// render as a simple property if there's no mapping
538539
if (discriminator.mapping === undefined) {
539-
return undefined;
540+
return createEdges({ name, schema, required });
540541
}
541542

542543
return create("div", {

0 commit comments

Comments
 (0)