Download (or clone) the Swagger UI repository. You'll need the following files from the dist
folder:
In the <head>
section of your web page, add:
Inside the <body>
, add:
<div id="swagger-ui"></div>
is the DOM node inside which Swagger UI will be rendered. The SwaggerUIBundle
constructor initializes Swagger UI. This is where you specify your spec URL and other parameters.