From 8e3afe71d1d3f4d6b9e8d8e21896e0a988fd16b5 Mon Sep 17 00:00:00 2001 From: HaseenaSainul Date: Fri, 3 Nov 2023 06:02:11 -0400 Subject: [PATCH] CPPSDK: check additionalProperties case well before excluding content --- src/macrofier/types.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/macrofier/types.mjs b/src/macrofier/types.mjs index 4ef38043..05a996d4 100644 --- a/src/macrofier/types.mjs +++ b/src/macrofier/types.mjs @@ -338,7 +338,8 @@ const insertObjectMacros = (content, schema, module, title, property, options) = content = content.replace(regex, properties.join('\n')) .replace(/\$\{level}/g, options.parentLevel > 0 ? options.parentLevel : '') - if (!schema.properties && ! schema.propertyNames) { + if (!schema.properties && !schema.propertyNames && !schema.additionalProperties) { +// console.log("schema --- ", schema, " name -- ", options.property) content = !schema.additionalProperties ? getTemplate(path.join(options.templateDir, 'object-empty-property')) : '' } })