Skip to content

Commit 53e7b60

Browse files
authored
fix: ignore undefined inside unions in supportPathDataType
fixes part of #1430
1 parent 6380e48 commit 53e7b60

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/cli/src/metadataGeneration/parameterGenerator.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,8 @@ export class ParameterGenerator {
439439
}
440440

441441
if (parameterType.dataType === 'union') {
442-
return !parameterType.types.map(t => this.supportPathDataType(t)).some(t => t === false);
442+
// skip undefined inside unions
443+
return !parameterType.types.map(t => t.dataType === 'undefined' ? true : this.supportPathDataType(t)).some(t => t === false);
443444
}
444445

445446
return false;

0 commit comments

Comments
 (0)