From 57406cfeb6865d1078d3ef9a2bab8ebec9864f94 Mon Sep 17 00:00:00 2001 From: Mikhail Tseluiko Date: Tue, 26 Jan 2021 16:31:55 +0200 Subject: [PATCH] FE: fix references in items if udt was not used before --- forward_engineering/api.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/forward_engineering/api.js b/forward_engineering/api.js index 450d468..c6ba6cd 100644 --- a/forward_engineering/api.js +++ b/forward_engineering/api.js @@ -972,6 +972,12 @@ const replaceUdt = (avroSchema, udt) => { } }; const extractArrayItem = (schema) => { + if (typeof schema.items === 'string') { + return { + ...schema, + items: getTypeFromUdt(schema.items, udt), + }; + } const items = convertType(schema.items); const previousType = _.get(schema, 'items.type', items.type); const convertedType = items.type;