From 7b130e91b641e9f1da9d7615e92a1bae63721507 Mon Sep 17 00:00:00 2001 From: Josh Chappelow Date: Mon, 23 Sep 2024 20:28:27 +0900 Subject: [PATCH] refactor: remove unneeded guard --- packages/cli/src/swagger/specGenerator3.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/cli/src/swagger/specGenerator3.ts b/packages/cli/src/swagger/specGenerator3.ts index 1d7c4b0f1..cc17ee02d 100644 --- a/packages/cli/src/swagger/specGenerator3.ts +++ b/packages/cli/src/swagger/specGenerator3.ts @@ -696,7 +696,6 @@ export class SpecGenerator3 extends SpecGenerator { if (types.size === 1) { const type = types.values().next().value; - if (!type) throw new Error('Enum must be defined'); const nullable = enumType.enums.includes(null) ? true : false; return { ...(title && { title }), type, enum: enumType.enums.map(member => getValue(type, member)), nullable }; } else {