swagger-ui
swagger-ui copied to clipboard
Pass data directly
Is it possible to pass data directly , rather than passing json url in URL ,
I want to pass json directly to UI Bundle
Use the spec parameter:
const ui = SwaggerUIBundle({
"dom_id": "#swagger-ui",
spec: {
"swagger": "2.0",
"info": { ... },
"paths": { ... },
...
},
...
})