diff --git a/demo/examples/petstore-1.0.0.yaml b/demo/examples/petstore-1.0.0.yaml index 7fde9ea1d..3c5e1c0d2 100644 --- a/demo/examples/petstore-1.0.0.yaml +++ b/demo/examples/petstore-1.0.0.yaml @@ -242,10 +242,14 @@ paths: properties: name: description: Updated name of the pet - type: string + type: + - string + - "null" status: description: Updated status of the pet - type: string + type: + - string + - "null" delete: tags: - pet diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/SchemaItem/index.tsx b/packages/docusaurus-theme-openapi-docs/src/theme/SchemaItem/index.tsx index ead487674..48ab32d80 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/SchemaItem/index.tsx +++ b/packages/docusaurus-theme-openapi-docs/src/theme/SchemaItem/index.tsx @@ -195,7 +195,9 @@ export default function SchemaItem(props: Props) { > {name} - {schemaName} + + {Array.isArray(schemaName) ? schemaName.join(" | ") : schemaName} + {(nullable || required || deprecated) && ( )}