-
Notifications
You must be signed in to change notification settings - Fork 577
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: custom Ignore swagger endpoint (#3601)
* fix: swagger exclude controller decorator implement by method decorator * feat: add routerFilter * docs: update ws * fix: empty tags * fix: tags array
- Loading branch information
1 parent
e51d891
commit 5f02aaf
Showing
11 changed files
with
309 additions
and
46 deletions.
There are no files selected for viewing
10 changes: 4 additions & 6 deletions
10
packages/swagger/src/decorators/api-exclude-controller.decorator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
import { createCustomMethodDecorator } from '@midwayjs/core'; | ||
import { saveClassMetadata } from '@midwayjs/core'; | ||
import { DECORATORS } from '../constants'; | ||
|
||
export function ApiExcludeController(disable = true): any { | ||
return createCustomMethodDecorator( | ||
DECORATORS.API_EXCLUDE_CONTROLLER, | ||
[disable], | ||
false | ||
); | ||
return (target: any) => { | ||
saveClassMetadata(DECORATORS.API_EXCLUDE_CONTROLLER, { disable }, target); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.