swaggo / gin-swagger

gin middleware to automatically generate RESTful API documentation with Swagger 2.0.
MIT License
3.66k stars 266 forks source link

Using gin-swagger encountered a javascript error, causing the google browser not to display the swagger api page, the javascript error is as follows #273

Open Skobo opened 1 year ago

Skobo commented 1 year ago

Uncaught ReferenceError: SwaggerUIBundle is not defined at window.onload

Skobo commented 1 year ago

javascript besides error Uncaught SyntaxError: Unexpected token '?'

nikhilchoudhary001 commented 11 months ago

I'm getting same error on gin-swagger v1.6.0

Uncaught ReferenceError: SwaggerUIBundle is not defined at window.onload (index.html:75:14)

nikhilchoudhary001 commented 11 months ago

I was able to resolve the error by setting readTimeout and writeTimeout to 10 seconds (previously it was 5 sec and was unable to download large /swagger/swagger-ui-bundle.js content)