You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// @title API for my application
// @version 0.1
// @description It's made for testing purposes only
// @host localhost:8080
// @BasePAth /
func main() { ... }
And this is in /internal/handlers/users.go:
// Returns full user info godoc
// @Description Returns lists
// @Summary Returns full user info
// @Tags Lists
// @Accept json
// @Produce json
// @Success default {object} domain.Response
// @Failure default {object} domain.Response
// @Router /users/full [get]
func (h userHandler) getFullUserInfo(w http.ResponseWriter, r *http.Request) { ... }
I'm running swag init -g cmd/api/main.go --parseDependency --parseInternal
from the root directory of the project.
I'm getting
> Generate swagger docs....
> Generate general API Info, search dir:./
> warning: failed to get package name in dir: ./, error: execute go list command, exit status 1, stdout:, stderr:no Go files in /Users/stycho/GolandProjects/my_life
> create docs.go at docs/docs.go
> create swagger.json at docs/swagger.json
> create swagger.yaml at docs/swagger.yaml
I've tried different --parseDepth values, no --parseDependency or --parseInternal . I've also tried to make blank import in /internal/handlers/users.go - all this doesn't help.
I tried to google the solution, but haven't find anything. I can't understand what I'm doing wrong. Could you help me please?
The text was updated successfully, but these errors were encountered:
Hi! I can't generate documentation to my project.
My project's structure looks like that:
I have the next annotation in /cmd/api/main.go:
And this is in /internal/handlers/users.go:
I'm running
swag init -g cmd/api/main.go --parseDependency --parseInternal
from the root directory of the project.
I'm getting
and "No operations defined in spec!" when I enter http://localhost:8080/swagger/index.html .
I've tried different
--parseDepth
values, no--parseDependency
or--parseInternal
. I've also tried to make blank import in /internal/handlers/users.go - all this doesn't help.I tried to google the solution, but haven't find anything. I can't understand what I'm doing wrong. Could you help me please?
The text was updated successfully, but these errors were encountered: