From 8266d8f6d7bcb866de34141e95f79773eef7a941 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/macrofier/types.mjs b/src/macrofier/types.mjs index 4ef38043..280b7192 100644 --- a/src/macrofier/types.mjs +++ b/src/macrofier/types.mjs @@ -338,7 +338,7 @@ 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) { content = !schema.additionalProperties ? getTemplate(path.join(options.templateDir, 'object-empty-property')) : '' } })