From 3349a8fb987353b59db05fc4f474b669d07c014e Mon Sep 17 00:00:00 2001 From: Pearson Date: Wed, 20 Nov 2024 13:29:50 -0800 Subject: [PATCH] fix: Cpp gen --- src/macrofier/types.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/macrofier/types.mjs b/src/macrofier/types.mjs index 2848ceb6..6166e748 100644 --- a/src/macrofier/types.mjs +++ b/src/macrofier/types.mjs @@ -345,7 +345,10 @@ const insertObjectMacros = (content, schema, module, title, property, options) = } const schemaShape = indent + getSchemaShape(localizedProp, module, options2).replace(/\n/gms, '\n' + indent) - const type = localizedProp.type === 'object' ? getSchemaShape(localizedProp, module, { ...options2, type: true }): getSchemaType(localizedProp, module, options2) + let type = getSchemaType(localizedProp, module, options2) + if (type === 'object') { + type = getSchemaShape(localizedProp, module, { ...options2, type: true }) + } // don't push properties w/ unsupported types if (type) { const description = getSchemaDescription(prop, module)