swagger icon indicating copy to clipboard operation
swagger copied to clipboard

feat: Add exclude as a complement to exclude.

Open evantrimboli opened this issue 4 years ago • 7 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)
  • [x] Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] 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?

https://github.com/nestjs/swagger/issues/1288

Issue Number: 1288

What is the new behavior?

exclude works as a complement to include.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

evantrimboli avatar Apr 06 '21 09:04 evantrimboli

@evantrimboli I would grateful if you would resolve conflicts to push it further. I also need this feature :slightly_smiling_face:

sgrigorev avatar Jan 10 '22 14:01 sgrigorev

The code here looks solid. If we can get the conflicts resolved I could see this being useful.

jmcdo29 avatar Jan 10 '22 18:01 jmcdo29

Upon reflection I think this PR doesn't make sense as-is. I think it would be better to alter the type of include to:

type IncludeFn = (module: Function) => boolean;
include?: IncludeFn | Function[];

evantrimboli avatar Jan 10 '22 20:01 evantrimboli

Upon reflection I think this PR doesn't make sense as-is. I think it would be better to alter the type of include to:

type IncludeFn = (module: Function) => boolean;
include?: IncludeFn | Function[];

Oh, even better with less complexity. I'm game for that

jmcdo29 avatar Jan 10 '22 20:01 jmcdo29

Was this included on another PR or it was abandoned?

bryan-gc avatar Jul 25 '23 04:07 bryan-gc