Skip to content

Commit

Permalink
refactor: remove unneeded guard
Browse files Browse the repository at this point in the history
  • Loading branch information
chappelo committed Sep 23, 2024
1 parent a865a2c commit 7b130e9
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/cli/src/swagger/specGenerator3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7b130e9

Please sign in to comment.