Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gas-buddy/configured-swaggerize-express
A configuration driven swaggerize-express middleware
https://github.com/gas-buddy/configured-swaggerize-express
Last synced: about 2 months ago
JSON representation
A configuration driven swaggerize-express middleware
- Host: GitHub
- URL: https://github.com/gas-buddy/configured-swaggerize-express
- Owner: gas-buddy
- Created: 2016-11-16T20:23:43.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-01-27T15:11:57.000Z (about 3 years ago)
- Last Synced: 2024-04-15T00:45:49.330Z (10 months ago)
- Language: JavaScript
- Size: 518 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
configured-swaggerize-express
=============================[![Greenkeeper badge](https://badges.greenkeeper.io/gas-buddy/configured-swaggerize-express.svg)](https://greenkeeper.io/)
A small wrapper around swaggerize-express to allow runtime security
handling and config-based instantiation. Please note that if you
instantiate the module in configuration, you must resolve the promise
that the factory function returns before passing to meddleware. For example:**config.json**
```
{
"meddleware": {
"myService": {
"module": {
"factory": "require:@gasbuddy/configured-swaggerize-express",
"arguments": [{
"spec": "require:some-swagger-module"
}]
}
}
}
}
```**server.js**
```
import * as configSwagger from '@gasbuddy/configured-swaggerize-express';// Load confit first into a variable called config
app.use(meddleware(await configSwagger.resolveFactories(config.get('middleware')));
```