diff --git a/src/macrofier/types.mjs b/src/macrofier/types.mjs index 8aad2d6b..cba78534 100644 --- a/src/macrofier/types.mjs +++ b/src/macrofier/types.mjs @@ -350,8 +350,8 @@ const insertObjectMacros = (content, schema, module, title, property, options) = const description = getSchemaDescription(prop, module) let replacedTemplate = template .replace(/(^\s+)/g, '$1'.repeat(options2.level)) - .replace(/\$\{property\}/g, name) - .replace(/\$\{Property\}/g, capitalize(name)) + .replace(/\$\{property\}/g, safePropName(name)) + .replace(/\$\{Property\}/g, capitalize(safePropName(name))) .replace(/\$\{parent\.title\}/g, title) .replace(/\$\{title\}/g, type) .replace(/\$\{shape\}/g, schemaShape)