Closed OSA413 closed 7 months ago
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 https://github.com/nestjs/nest/issues/13107
Dev response: https://github.com/nestjs/nest/issues/13107#issuecomment-1921234278
Explanation and temporal fix: https://github.com/nestjs/nest/issues/13107#issuecomment-1921364281
Fixed with
"@nestjs/common": "^10.3.2",
"@nestjs/core": "^10.3.2",
Did you read the migration guide?
Is there an existing issue that is already proposing this?
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:
https://github.com/typeorm/typeorm/issues/10671