From 271f11e444b2c4e231376f30147f43de4cb83288 Mon Sep 17 00:00:00 2001 From: Mikhail Tseluiko Date: Wed, 20 Jan 2021 10:56:05 +0200 Subject: [PATCH] RE: fix primitive types definitions handling --- reverse_engineering/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reverse_engineering/api.js b/reverse_engineering/api.js index 42c208f..6cd3860 100644 --- a/reverse_engineering/api.js +++ b/reverse_engineering/api.js @@ -196,7 +196,7 @@ const handleType = (data, schema, parentSchema, definitions) => { if (Array.isArray(data.type)) { schema = handleMultipleTypes(data, schema, parentSchema, definitions); } else if (typeof data.type === 'object') { - if (data.type.name) { + if (data.type.name && ['record', 'enum', 'fixed'].includes(data.type.type)) { data.type = addDefinitions([data.type], definitions).pop(); handleRecursiveSchema(data, schema, {}, definitions);