diff --git a/packages/react-openapi/src/OpenAPISchema.tsx b/packages/react-openapi/src/OpenAPISchema.tsx index ce6fb86ba1..4977ed700e 100644 --- a/packages/react-openapi/src/OpenAPISchema.tsx +++ b/packages/react-openapi/src/OpenAPISchema.tsx @@ -182,6 +182,8 @@ export function OpenAPIRootSchema(props: { /** * Render a tab for an alternative schema. + * It renders directly the properties if relevant; + * for primitives, it renders the schema itself. */ function OpenAPISchemaAlternative(props: { schema: OpenAPIV3.SchemaObject; @@ -190,12 +192,13 @@ function OpenAPISchemaAlternative(props: { }) { const { schema, circularRefs, context } = props; const id = useId(); + const subProperties = getSchemaProperties(schema); return ( );