typeorm: 0.3.20 introduces issues with @ApiProperty on some DTOs
OSA413 opened this issue · comments
Did you read the migration guide?
- I have read the whole migration guide
Is there an existing issue that is already proposing this?
- I have searched the existing issues
Potential Commit/PR that introduced the regression
No response
Versions
No response
Describe the regression
So, I recently updated packages and Swagger started to throw errors related to @ApiProperty (Optional) and circular dependency though a week ago it was just fine.
After investigation I figured out that downgrading typeorm from 0.3.20 to 0.3.19 fixes the issue.
Minimum reproduction code
https://github.com/OSA413/nestjs-bug-swagger-api-property
Expected behavior
For the error to not be thrown.
Other
Some more details of the issue can be found in NestJS' Discord and in this issue:
we can close this as this is not related to @nestjs/swagger
but typeorm
0.3.20
we can close this as this is not related to
@nestjs/swagger
buttypeorm
0.3.20
As you mentioned in the comment, this may be related to updating reflect-metadata
.
Like, does @nestjs/swagger
work with reflect-metadata: 0.2.1
? Will it support the newer version?
Looks like this issue is related to other issues with the update of reflect-metadata
like:
I guess that this issue can be closed as duplicate of nestjs/nest#13107
Dev response: nestjs/nest#13107 (comment)
Explanation and temporal fix: nestjs/nest#13107 (comment)
Fixed with
"@nestjs/common": "^10.3.2",
"@nestjs/core": "^10.3.2",