-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(@whook/swagger-ui): Allow to specify a dev token
- Loading branch information
Showing
10 changed files
with
100 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,31 @@ | ||
import getOpenAPI, { | ||
definition, | ||
definition as baseGetOpenAPIDefinition, | ||
} from '@whook/swagger-ui/dist/handlers/getOpenAPI'; | ||
|
||
// TODO: Use WHOOK_PLUGINS to get handlers from plugins | ||
// instead of proxying here | ||
export { definition }; | ||
|
||
export const definition = { | ||
...baseGetOpenAPIDefinition, | ||
operation: { | ||
...baseGetOpenAPIDefinition.operation, | ||
parameters: [ | ||
...(baseGetOpenAPIDefinition.operation.parameters || []), | ||
{ | ||
in: 'header', | ||
name: 'authorization', | ||
schema: { | ||
type: 'string', | ||
}, | ||
}, | ||
{ | ||
in: 'query', | ||
name: 'access_token', | ||
schema: { | ||
type: 'string', | ||
}, | ||
}, | ||
], | ||
}, | ||
}; | ||
export default getOpenAPI; |
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
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