OpenAPI: Fix nullable types cannot be detected

This commit is contained in:
fuma-nama
2024-06-08 13:31:48 +08:00
parent ead042ae03
commit 1d3917f210
6 changed files with 17 additions and 5 deletions
+2 -2
View File
@@ -2,6 +2,6 @@
'fumadocs-core': major
---
Remove `minWidth` deprecated option from `Sidebar` component
**Remove `minWidth` deprecated option from `Sidebar` component.**
migrate: Use `blockScrollingWidth` instead
**migrate:** Use `blockScrollingWidth` instead
+7 -1
View File
@@ -2,4 +2,10 @@
'fumadocs-ui': major
---
New Layout
**New Layout**
- Remove navbar from docs layout, replace it with sidebar.
- On smaller devices, navbar is always shown.
- Remove exports of internal components, copying components from the repository is now the preferred way.
**migrate:** Modify your stylesheet if necessary. In general, it won't cause problems.
+5
View File
@@ -0,0 +1,5 @@
---
'fumadocs-openapi': patch
---
Fix nullable types cannot be detected
+2
View File
@@ -135,6 +135,8 @@ function resolveObjectType(
function getSchemaType(schema: OpenAPI.SchemaObject): string {
if (schema.nullable) {
if (!schema.type) return 'null';
return `${getSchemaType({ ...schema, nullable: false })} | null`;
}
+1 -1
View File
@@ -120,7 +120,7 @@ export function APIExample({
return (
<div
className={cn('sticky top-14 h-fit xl:w-2/5 xl:min-w-[400px]', className)}
className={cn('sticky top-6 h-fit xl:w-2/5 xl:min-w-[400px]', className)}
{...props}
>
<div className="flex flex-row items-center gap-4 xl:hidden">
-1
View File
@@ -33,7 +33,6 @@ export const typography = {
},
table: {
fontSize: '14px',
whiteSpace: 'nowrap',
},
'thead th': {
textAlign: 'start',