Adds middleware to your express app to serve the Swagger UI bound to your Swagger document. This acts as living documentation for your API hosted from within your app.
MIT License
1.43k
stars
226
forks
source link
Can't find any html element in Custom javascript #271
In the htmlTplString, there is a place for <% customJs %>. The custom javascript is placed in the html header, so I am not able to find any html element with querySelector, getElementById or getElementByClassName in the swagger ui with custom js.
I needed the <% customJs %> placed just after the <script src="./swagger-ui-init.js"> </script> and before the <% customCssUrl %> in the template. In that case I am able to find the html element whatever I want in the swagger ui. (I tested it.)
In the
htmlTplString
, there is a place for<% customJs %>
. The custom javascript is placed in the html header, so I am not able to find any html element with querySelector, getElementById or getElementByClassName in the swagger ui with custom js.I needed the
<% customJs %>
placed just after the<script src="./swagger-ui-init.js"> </script>
and before the<% customCssUrl %>
in the template. In that case I am able to find the html element whatever I want in the swagger ui. (I tested it.)