Open auribuo opened 1 year ago
Maybe try putting router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
just after you define your router or change it to api.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
.
i had the same problem!
I'm seeing the same issue using gofiber v2.
The weird thing is that the code below has been working for over a year without errors, and suddenly last week stopped working:
swaggerURL := fmt.Sprintf("%v/swagger", os.Getenv(serverBaseURLEnvVar))
app.Get(swaggerURL, fiberSwagger.WrapHandler)
app.Get(swaggerURL+"/", fiberSwagger.WrapHandler)
app.Get(swaggerURL+"/*", fiberSwagger.WrapHandler)
Hi, i set up gin-swagger as described in the README.md. Problem is that when i navigate to the route i get an error telling
Uncaught ReferenceError: SwaggerUIBundle is not defined
. Before that i get warnings that both“http://localhost:8080/swagger/swagger-ui-bundle.js”
and“http://localhost:8080/swagger/swagger-ui-standalone-preset.js”
failed to load.Here is the code I wrote
Here is the console output:![image](https://user-images.githubusercontent.com/48835871/215209529-f2722dbf-e8c6-4737-b68c-141cb69e4be6.png)