Open vinodborole opened 1 year ago
Can you post the error, that is being thrown?
Hi @Nerzal
There is no error on the golang console, however this is what i see in the browsers developer tools
I've found the same error here. I'm not using echo. Instead I was using https://github.com/swaggo/http-swagger. The problem is actually due to https://github.com/swaggo/echo-swagger/blob/master/go.mod and http-swagger depending on swag version 1.8.12
. There is a open PR to solve this problem on the http-swagger
: https://github.com/swaggo/http-swagger/pull/102
But I actually think they will update these dependencies only after the swag v2 stable release is available.
Until then you can build your own html page (like a copy paste with the echo-swagger
project, only one file)
any solution?
This https://github.com/swaggo/swag/issues/830#issuecomment-725587162 solved this issue.
SO, just add the following line on the imports section
import (
_ "<your_mod>/docs" // which is the generated folder after swag init
)
SO, just add the following line on the imports section
import ( _ "<your_mod>/docs" // which is the generated folder after swag init )
Thank you so much, this solution work for me
Swag v2.0.0-rc3 generated docs throws internal server error with echo framework Internal Server Error doc.json with swag latest version and echo framework.
To Reproduce Steps to reproduce the behavior:
Expected behavior swagger UI opens up without any error.
Screenshots Internal Server Error doc.json.
Your swag version v2.0.0-rc3
Your go version 1.19
Desktop (please complete the following information):
Additional context Add any other context about the problem here.