From dee52fa80af06d8bb4181b41c4b183fbb665643f Mon Sep 17 00:00:00 2001 From: "Nolann B." <100787331+nolannbiron@users.noreply.github.com> Date: Tue, 17 Mar 2026 10:27:56 +0100 Subject: [PATCH] Fix schema title display stripping spaces (#4120) --- packages/gitbook/src/components/DocumentView/OpenAPI/style.css | 2 +- packages/react-openapi/src/utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/gitbook/src/components/DocumentView/OpenAPI/style.css b/packages/gitbook/src/components/DocumentView/OpenAPI/style.css index c0d3da3d2..5263fd5bc 100644 --- a/packages/gitbook/src/components/DocumentView/OpenAPI/style.css +++ b/packages/gitbook/src/components/DocumentView/OpenAPI/style.css @@ -233,7 +233,7 @@ } .openapi-schema-type { - @apply text-tint select-text text-[0.813rem] font-mono [word-spacing:-0.25rem]; + @apply text-tint select-text text-[0.813rem] font-mono [word-spacing:-0.25rem] whitespace-normal; } .openapi-schema-type:only-child { diff --git a/packages/react-openapi/src/utils.ts b/packages/react-openapi/src/utils.ts index ff294ec26..f0523766b 100644 --- a/packages/react-openapi/src/utils.ts +++ b/packages/react-openapi/src/utils.ts @@ -306,7 +306,7 @@ export function getSchemaTitle( // Only add the title if it's an object (no need for the title of a string, number, etc.) if (type === 'object' && schema.title) { - type += ` · ${schema.title.replaceAll(' ', '')}`; + type += ` · ${schema.title}`; } } }