Skip to content

Commit

Permalink
CPPSDK: check additionalProperties case well before excluding content
Browse files Browse the repository at this point in the history
  • Loading branch information
HaseenaSainul committed Nov 3, 2023
1 parent ffa0f26 commit ff58316
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/macrofier/types.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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')) : ''
}
})
Expand Down

0 comments on commit ff58316

Please sign in to comment.