From 7230915e627a7a96110ec3dd8ee6d84bc70bb54f Mon Sep 17 00:00:00 2001 From: Artur Kraft Date: Sat, 9 Mar 2024 16:41:50 +0100 Subject: [PATCH] if enum is of type array, use the item type --- lib/services/schema-object-factory.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/services/schema-object-factory.ts b/lib/services/schema-object-factory.ts index 8c72bd989..2abd16eca 100644 --- a/lib/services/schema-object-factory.ts +++ b/lib/services/schema-object-factory.ts @@ -273,7 +273,7 @@ export class SchemaObjectFactory { : undefined; schemas[enumName] = { - type: param.schema?.['type'] ?? 'string', + type: (param.isArray ? param.schema?.['items']?.['type'] : param.schema?.['type']) ?? 'string', enum: _enum }; }