Skip to content

Commit

Permalink
fix: Remove unneeded changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kschrief committed Aug 30, 2024
1 parent b532b39 commit 5503f8e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion languages/c/templates/json-types/property-assign.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
Add(_T("${property}"), &${Property});
${Property} = other.${Property}
members[${property.raw}] = ${Property}
2 changes: 1 addition & 1 deletion languages/cpp/templates/methods/property.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const string method = _T("${info.title.lowercase}.${method.name}");
${if.params}JsonObject jsonParameters;${end.if.params}
${if.params}${method.params.serialization}${end.if.params}
${method.result.json.type} jsonResult;
${method.result.json} jsonResult;
${method.result.initialization}
${if.params}Firebolt::Error status = FireboltSDK::Properties::Get(method, jsonParameters, jsonResult);${end.if.params}
${if.params.empty}Firebolt::Error status = FireboltSDK::Properties::Get(method, jsonResult);${end.if.params.empty}
Expand Down
2 changes: 0 additions & 2 deletions src/macrofier/types.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,8 @@ const insertObjectMacros = (content, schema, module, title, property, options) =
// don't push properties w/ unsupported types
if (type) {
const description = getSchemaDescription(prop, module)
const additionalType = typeof prop.type == 'string' ? getPrimitiveType(prop.type, 'additional-types') : null
let replacedTemplate = template
.replace(/(^\s+)/g, '$1'.repeat(options2.level))
.replace(/\$\{additional\.type\}/g, additionalType) //C++ - Gives the object type (Ex: Boolean()). Non-AnyOf only
.replace(/\$\{property.raw\}/g, name) //Gives the raw RPC propery name, even if it's unsafe
.replace(/\$\{Property.raw\}/g, capitalize(name))
.replace(/\$\{property\}/g, safePropName(name))
Expand Down

0 comments on commit 5503f8e

Please sign in to comment.