Skip to content

Commit cc80e62

Browse files
authored
Change the tab label of anyOf/oneOf (PaloAltoNetworks#1167)
* feat: support null type * fix: fix tab label
1 parent ed09e45 commit cc80e62

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/docusaurus-theme-openapi-docs/src/theme/Schema

packages/docusaurus-theme-openapi-docs/src/theme/Schema/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const AnyOneOf: React.FC<SchemaProps> = ({ schema, schemaType }) => {
116116
</span>
117117
<SchemaTabs>
118118
{schema[type]?.map((anyOneSchema: any, index: number) => {
119-
const label = anyOneSchema.title || `MOD${index + 1}`;
119+
const label = anyOneSchema.title || anyOneSchema.type;
120120
return (
121121
// @ts-ignore
122122
<TabItem

0 commit comments

Comments
 (0)