You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems to be a regression of issue #502. Works in 4.8.2, fails in 5.0.0
[x] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
Nest crashes with this error:
(node:9740) UnhandledPromiseRejectionWarning: Error: A circular dependency has been detected (property key: "is_migrated"). Please, make sure that each side of a bidirectional relationships are using lazy resolvers ("type: () => ClassType").
at SchemaObjectFactory.createNotBuiltInTypeReference (/Users/mmacdonald/Desktop/repro/myapp/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:204:19)
at SchemaObjectFactory.mergePropertyWithMetadata (/Users/mmacdonald/Desktop/repro/myapp/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:141:25)
at /Users/mmacdonald/Desktop/repro/myapp/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:270:43
at Array.forEach (<anonymous>)
at SchemaObjectFactory.createFromObjectLiteral (/Users/mmacdonald/Desktop/repro/myapp/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:254:24)
at SchemaObjectFactory.mergePropertyWithMetadata (/Users/mmacdonald/Desktop/repro/myapp/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:120:25)
at /Users/mmacdonald/Desktop/repro/myapp/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:79:35
at Array.map (<anonymous>)
at SchemaObjectFactory.extractPropertiesFromType (/Users/mmacdonald/Desktop/repro/myapp/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:78:52)
at SchemaObjectFactory.exploreModelSchema (/Users/mmacdonald/Desktop/repro/myapp/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:92:41)
If I downgrade to @nestjs/swagger@^4.8.2, the error goes away and Swagger works again.
Expected behavior
Expected it to work as it did in v4.8.2
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Allow object properties to work in DTO classes again.
Environment
[Nest Platform Information]
platform-express version : 8.0.0
swagger version : 5.0.0
common version : 8.0.0
core version : 8.0.0
[System Information]
OS Version : macOS Catalina
NodeJS Version : v14.15.3
NPM Version : 6.14.5
[Nest CLI]
Nest CLI Version : 8.0.2
The text was updated successfully, but these errors were encountered:
I'm submitting a...
Seems to be a regression of issue #502. Works in
4.8.2
, fails in5.0.0
Current behavior
Nest crashes with this error:
If I downgrade to
@nestjs/swagger@^4.8.2
, the error goes away and Swagger works again.Expected behavior
Expected it to work as it did in v4.8.2
Minimal reproduction of the problem with instructions
Repo is here, the important files are the DTO:
and the controller:
What is the motivation / use case for changing the behavior?
Allow object properties to work in DTO classes again.
Environment
The text was updated successfully, but these errors were encountered: