Skip to content

Commit 4733e7c

Browse files
committed
FE: Fix resolving external references to model
1 parent 1c3f915 commit 4733e7c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

forward_engineering/helpers/handleReferencePath.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ const handleReferencePath = (externalDefinitions, { $ref: ref }) => {
2626
if (externalDefinition.fileType === 'targetSchema') {
2727
return { $ref: updateOpenApiPath(pathToFile, relativePath) };
2828
} else if (externalDefinition.fileType === 'hackoladeSchema') {
29-
return externalDefinition;
29+
const definition = { ...externalDefinition };
30+
delete definition.$ref;
31+
32+
return definition;
3033
} else if (externalDefinition.fileType === 'jsonSchema') {
3134
return { $ref: fixJsonSchemaPath(pathToFile, relativePath) };;
3235
}

0 commit comments

Comments
 (0)