Open mohanprasathsj opened 1 year ago
I also encountered this problem. However, I don't know how it happened. It didn't occur right from the start because it was working fine initially. As I kept writing code continuously without dealing with Swagger, it just happened on its own.
@mohanprasathsj I have solved it. Just debug your code to find the error that caused the issue with gin. It could possibly be a middleware problem.
inspect the network response by F12
I a using the following code, when I did swag init and tried to view the swagger-ui, I am getting the following exception "Please indicate a valid Swagger or OpenAPI version field. Supported version fields are swagger: "2.0" and those that match openapi: 3.0.n (for example, openapi: 3.0.0)."![image](https://github.com/swaggo/gin-swagger/assets/123525782/3f2b5179-3355-4a45-928e-1510b60c5b3a)
I tried to do update all versions but I could not resolve the issue. Has anyone got such issue and how can I fix this issue? Generated file seems to be ok.