Go-Swagger autogen documentation

557 Views Asked by At

I'm trying to create my API documentation using go-swagger. The structure of my project:

struct of my project

In the cmd/main_api folder, I'm launching swag init. Swagger successfully pulls up the annotation from main.go, but does not pull up the annotation from internal (models, handlers). If I use swag init swag init --parseDependency=true then there is a panic:

panic in use swag init with parseDependency

How to make Swagger pull up an annotation from all project folders?

1

There are 1 best solutions below

0
vuhoanghiep1993 On

Had the same issue, upgrading to v1.8.9 solved it !

go install github.com/swaggo/swag/cmd/[email protected]