https://github.com/spoonx/serverless-swaggerui
Serverless plugin that serves SwaggerUI
https://github.com/spoonx/serverless-swaggerui
Last synced: about 1 year ago
JSON representation
Serverless plugin that serves SwaggerUI
- Host: GitHub
- URL: https://github.com/spoonx/serverless-swaggerui
- Owner: SpoonX
- License: mit
- Created: 2021-04-08T14:59:52.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-08T15:10:18.000Z (about 5 years ago)
- Last Synced: 2025-03-16T16:16:40.821Z (over 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Serverless-swaggerui
Tiny plugin that simply serves SwaggerUI.
## Config options
All options are optional.
```yml
custom:
swagger:
version: 3.46.0 # Version of swaggerUI to use.
port: 1991 # What port to serve swaggerUI from
url: http://localhost:3000/local/swagger # Where to find the swagger definition
path: /local/swagger # Used when url was not provided.
accessToken: # prefill swagger-ui with an api-key.
name: bearerBasedAuth
value: the.jwt.token
```
## Notes
- If you intend to use the accessToken option it is recommended you [use a javascript file to provide the config](https://www.serverless.com/framework/docs/providers/aws/guide/variables#reference-variables-in-javascript-files).
- The only magic is the default swagger URL. When not provided this plugin assumes you have [serverless-offline](https://www.serverless.com/plugins/serverless-offline) installed and uses it to build the URL.
## License
MIT