mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 10:03:31 +00:00
Fix OpenAPI alternatives not showing (#3699)
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"@gitbook/react-openapi": patch
|
||||||
|
"gitbook": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix OpenAPI alternatives not showing
|
||||||
@@ -840,7 +840,7 @@ body:has(.openapi-select-popover) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.openapi-disclosure-trigger-label {
|
.openapi-disclosure-trigger-label {
|
||||||
@apply absolute right-3 px-2 h-5 justify-end shrink-0 ring-tint-subtle truncate text-tint duration-300 transition-all rounded straight-corners:rounded-none circular-corners:rounded-xl flex flex-row gap-1 items-center text-xs;
|
@apply absolute right-3 mr-px px-2 h-5 justify-end shrink-0 ring-tint-subtle truncate text-tint duration-300 transition-all rounded straight-corners:rounded-none circular-corners:rounded-xl flex flex-row gap-1 items-center text-xs;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-disclosure-trigger-label span {
|
.openapi-disclosure-trigger-label span {
|
||||||
|
|||||||
@@ -60,16 +60,6 @@ function OpenAPISchemaProperty(
|
|||||||
|
|
||||||
const header = <OpenAPISchemaPresentation context={context} property={property} />;
|
const header = <OpenAPISchemaPresentation context={context} property={property} />;
|
||||||
const content = (() => {
|
const content = (() => {
|
||||||
if (properties?.length) {
|
|
||||||
return (
|
|
||||||
<OpenAPISchemaProperties
|
|
||||||
properties={properties}
|
|
||||||
circularRefs={circularRefs}
|
|
||||||
context={context}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (alternatives?.schemas) {
|
if (alternatives?.schemas) {
|
||||||
const { schemas, discriminator } = alternatives;
|
const { schemas, discriminator } = alternatives;
|
||||||
return (
|
return (
|
||||||
@@ -94,6 +84,16 @@ function OpenAPISchemaProperty(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (properties?.length) {
|
||||||
|
return (
|
||||||
|
<OpenAPISchemaProperties
|
||||||
|
properties={properties}
|
||||||
|
circularRefs={circularRefs}
|
||||||
|
context={context}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user