Creates Swagger document sources for a local file.
import createServer from "@egomobile/http-server"import { setupSwaggerProxy, sourcesFromFile } from "@egomobile/swagger-proxy"async function main() { const app = createServer() setupSwaggerProxy(app, { "baseDocument": { "info": { "title": "My merged API", "version": "1.0.0" } }, "sources": [ ...sourcesFromFile('/path/to/local/file1.json'), ...sourcesFromFile('/path/to/local/file2.yaml'), ] }) await app.listen(8080)}main().catch(console.error)
The new fetcher.
The path to the file.
Generated using TypeDoc
Creates Swagger document sources for a local file.
Example
Returns
The new fetcher.