Is there an existing issue for this?
Current behavior
When describing a property like this:
@ApiProperty({ type: Boolean, enum: [true] })
hello = true;
The generated openapi property looks like this:
{ "hello": { "type": "number", "enum": [true] } }
Notice the number type where it should be boolean.
Minimum reproduction code
https://github.com/thomaslule/nestjs-boolean-enum
Steps to reproduce
npm i
npm run start:dev
- navigate to http://localhost:3000/api-json
- notice that the type of
hello is number instead of boolean
Expected behavior
I expect this generated openapi property:
{ "hello": { "type": "boolean", "enum": [true] } }
Package version
11.2.6
NestJS version
11.0.1
Node.js version
24.2.0
In which operating systems have you tested?
Other
I also tried to write @ApiProperty({ type: 'boolean', enum: [false] }) and obtained the same result.