2

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?

Lei Cao
  • 457
  • 6
  • 13

2 Answers2

2

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.

Lei Cao
  • 457
  • 6
  • 13
2

Doownload this link https://github.com/beego/swagger and put it to your project. Then,go http://localhost:8080/swagger/

Kyaw Myint Thein
  • 540
  • 4
  • 10