Creates Swagger document sources from an URL.
import createServer from "@egomobile/http-server"import { setupSwaggerProxy, sourcesFromUrl } from "@egomobile/swagger-proxy"async function main() { const app = createServer() setupSwaggerProxy(app, { "baseDocument": { "info": { "title": "My merged API", "version": "1.0.0" } }, "sources": [ ...sourcesFromUrl("https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.yaml"), ] }) await app.listen(8080)}main().catch(console.error)
The sources.
The raw URL.
Generated using TypeDoc
Creates Swagger document sources from an URL.
Example
Returns
The sources.