Skip to content

Commit

Permalink
finos#486 fix condition when instantiating
Browse files Browse the repository at this point in the history
  • Loading branch information
willosborne committed Oct 25, 2024
1 parent ea13280 commit f39875b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cli/src/commands/generate/components/instantiate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export function instantiateGenericObject(definition: object, schemaDirectory: Sc
if (!!detail?.const) {
out[key] = getPropertyValue(key, detail);
}
if (detail?.type === 'object') {
else if (detail?.type === 'object') {
// recursive instantiation
logger.info(`${renderedPath}: Recursively instantiating an ${objectType} object`);
logger.info(`${renderedPath}: Recursively instantiating a ${objectType} object`);
out[key] = instantiateGenericObject(detail, schemaDirectory, objectType, currentPath, instantiateAll, debug);
}
else if (detail?.type === 'array' && isArrayObjectComplex(detail, logger, renderedPath)) {
Expand Down
2 changes: 0 additions & 2 deletions cli/src/commands/generate/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ export async function runGenerate(patternPath: string, outputPath: string, debug
const final = await generate(patternPath, debug, instantiateAll, schemaDirectoryPath);

const output = JSON.stringify(final, null, 2);
logger.debug('Generated instantiation: ' + output);

const dirname = path.dirname(outputPath);

logger.debug('Writing output to ' + outputPath);
Expand Down

0 comments on commit f39875b

Please sign in to comment.