swagger
swagger copied to clipboard
fix: properly import external enums
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Other... Please describe:
What is the current behavior?
Issue Number: #2087
What is the new behavior?
Instead of relaying on fully qualified type for external enums, this prefers the paths from import statements to ensure the required path always exists.
Does this PR introduce a breaking change?
- [ ] Yes
- [x] No
Other information
This solution could probably be used in other places as well, but to not brake anything I opted for externals enums only.
Would love to see this land.
LGTM