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
[ ] 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
Using an enum from a separate module for a DTO class field results in the transpiled code under the _OPENAPI_METADATA_FACTORY property to be incorrect.
Expected behavior
Previously, in 4.8.0, this would reference the expected import path starting from node_modules.
This appears to have been introduced in: #1318. Previously, this logic would fall into the else block and have its import path be determined that way. Because the path here is technically resolvable, it doesn't raise an error and gets saved as-is.
Minimal reproduction of the problem with instructions
I'm submitting a...
Current behavior
Using an enum from a separate module for a DTO class field results in the transpiled code under the
_OPENAPI_METADATA_FACTORY
property to be incorrect.Expected behavior
Previously, in
4.8.0
, this would reference the expected import path starting fromnode_modules
.This appears to have been introduced in: #1318. Previously, this logic would fall into the
else
block and have its import path be determined that way. Because the path here is technically resolvable, it doesn't raise an error and gets saved as-is.Minimal reproduction of the problem with instructions
Example minimal repo: https://github.com/IodizedGabe/nestjs-swagger-incorrect-import
Steps:
yarn build
dist/scope.dto.js
The
enum
field will reference the local path to a given module, and not the expected import path.What is the motivation / use case for changing the behavior?
I would like to continue using
enums
from shared packages across my services.Environment
The text was updated successfully, but these errors were encountered: