diff --git a/.changeset/chilled-eggs-attack.md b/.changeset/chilled-eggs-attack.md new file mode 100644 index 000000000..ae9fe8277 --- /dev/null +++ b/.changeset/chilled-eggs-attack.md @@ -0,0 +1,5 @@ +--- +'@gitbook/react-openapi': patch +--- + +Fix missing alternative schemas diff --git a/packages/react-openapi/src/OpenAPISchema.tsx b/packages/react-openapi/src/OpenAPISchema.tsx index a012a1ec5..c7f384d99 100644 --- a/packages/react-openapi/src/OpenAPISchema.tsx +++ b/packages/react-openapi/src/OpenAPISchema.tsx @@ -50,7 +50,7 @@ function OpenAPISchemaProperty(props: { circularRefs.set(schema, id); const properties = getSchemaProperties(schema); - if (properties) { + if (properties?.length) { return (