swagger icon indicating copy to clipboard operation
swagger copied to clipboard

fix: properly import external enums

Open Michsior14 opened this issue 1 year ago • 1 comments

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.

Michsior14 avatar Aug 02 '24 16:08 Michsior14

Would love to see this land.

masegraye avatar Sep 17 '24 23:09 masegraye

LGTM

kamilmysliwiec avatar Oct 23 '24 10:10 kamilmysliwiec