-
Notifications
You must be signed in to change notification settings - Fork 534
ApiProperty with enum undefined changes type #3229
Copy link
Copy link
Closed
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Current behavior
Query parameter name shown as number despite the dto type says string
Minimum reproduction code
https://github.com/nxht/test-nestjs
Steps to reproduce
pnpm installpnpm start:dev- Open http://localhost:3000/docs#/App/AppController_getHello
Expected behavior
Query parameter name should be string
Package version
8.1.0
NestJS version
10.4.15
Node.js version
20.9.0
In which operating systems have you tested?
- macOS
- Windows
- Linux
Other
DTO tested:
export class TestDto {
@ApiProperty({
type: 'string',
enum: undefined,
})
name: string;
}When the enum: undefined is removed, it works normally.
Reactions are currently unavailable