Using this.constructor.name
is interpreted as default Function
for enum
#3338
Labels
this.constructor.name
is interpreted as default Function
for enum
#3338
Uh oh!
There was an error while loading. Please reload this page.
Is there an existing issue for this?
Current behavior
To transfer the
__caslSubjectType__
between Backend and Frontend we use this approach in our base entity, which all other CASL relevant entities inherit from:This results in the following OpenAPI definition:
Minimum reproduction code
https://stackblitz.com/edit/nestjs-typescript-starter-u7s4phpj?file=src%2Fdto%2Fsome.dto.ts&initialpath=/api
Steps to reproduce
This DTO is enough to trigger the behavior in conjunction with the
@nestjs/swagger
CLI plugin enabled.Expected behavior
There should be no
default
. Also there seems no way to override/remove this default. Only this works setting it tonull
:Package version
11.0.6
NestJS version
11.0.11
Node.js version
22.14.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: