I am following this blog and video to do the API demo, when I visit
http://127.0.0.1:8080/swagger I can see the link
/swagger-1/
but when I click it, It returns 404. Anyone knows about it?
It is a bug.
Generally you can see the Beego auto generated swagger document by visiting
http://127.0.0.1:8080/swagger/swagger-1/
The issue is if you visited from
http://127.0.0.1:8080/swagger
after clicking the link it will go to
http://127.0.0.1:8080/swagger-1/
which will return 404.
However if you visited from
http://127.0.0.1:8080/swagger/
after clicking the link it will go to
http://127.0.0.1:8080/swagger/swagger-1/
which will give you the documents you want.
Doownload this link https://github.com/beego/swagger and put it to your project. Then,go http://localhost:8080/swagger/