[Bug] install_deps install not the CLI swag without go install
davidaparicio opened this issue ยท 0 comments
davidaparicio commented
Description
Run the 3 commands on a fresh install
Reproduction
cd swagger-go-example/swaggo
swagger-go-example/swaggo on ๎ master [!] via ๐น v1.19.1
โ make install_deps && make swagger && make run
go get -u github.com/swaggo/swag/cmd/swag
go: downloading github.com/swaggo/swag v1.8.6
go: downloading github.com/urfave/cli/v2 v2.3.0
go: downloading github.com/go-openapi/spec v0.20.4
go: downloading github.com/KyleBanks/depth v1.2.1
go: downloading github.com/go-openapi/jsonreference v0.19.6
go: downloading github.com/PuerkitoBio/purell v1.1.1
go: downloading github.com/PuerkitoBio/purell v1.2.0
go: downloading github.com/go-openapi/swag v0.19.15
go: downloading github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578
go: downloading golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4
go: downloading github.com/urfave/cli v1.22.10
go: downloading github.com/urfave/cli/v2 v2.17.1
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.2
go: downloading golang.org/x/net v0.0.0-20221002022538-bcab6841153b
go: downloading github.com/russross/blackfriday/v2 v2.1.0
go: downloading golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e
go: downloading github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673
go: downloading gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
go: upgraded github.com/PuerkitoBio/purell v1.1.1 => v1.2.0
go: upgraded github.com/go-openapi/spec v0.20.3 => v0.20.7
go: upgraded github.com/go-openapi/swag v0.19.15 => v0.22.3
go: upgraded github.com/swaggo/swag v1.7.0 => v1.8.6
go: upgraded github.com/urfave/cli/v2 v2.3.0 => v2.17.1
go: upgraded golang.org/x/net v0.0.0-20210525063256-abc453219eb5 => v0.0.0-20221002022538-bcab6841153b
go: upgraded golang.org/x/sys v0.0.0-20210521203332-0cec03c779c1 => v0.0.0-20220928140112-f11e5e49a4ec
go: upgraded golang.org/x/tools v0.1.1 => v0.1.12
swag init -g ./server.go -o ./swagger
make: swag: No such file or directory
make: *** [swagger] Error 1
swagger-go-example/swaggo on ๎ master [!] via ๐น v1.19.1 took 4s
โ ls
go.mod go.sum main.go Makefile server.go swagger thing_api.go
swagger-go-example/swaggo on ๎ master [!] via ๐น v1.19.1
โ go install github.com/swaggo/swag/cmd/swag@latest
go: downloading github.com/mailru/easyjson v0.7.6
swagger-go-example/swaggo on ๎ master [!] via ๐น v1.19.1 took 6s
โ make install_deps && make swagger && make run
go get -u github.com/swaggo/swag/cmd/swag
swag init -g ./server.go -o ./swagger
2022/10/03 17:03:02 Generate swagger docs....
2022/10/03 17:03:02 Generate general API Info, search dir:./
2022/10/03 17:03:03 Generating main.ThingResponse
2022/10/03 17:03:03 Generating main.ErrorResponse
2022/10/03 17:03:03 Generating main.CreateThing
2022/10/03 17:03:03 Generating main.UpdateThing
2022/10/03 17:03:03 Generating main.ThingsResponse
2022/10/03 17:03:03 create docs.go at swagger/docs.go
2022/10/03 17:03:03 create swagger.json at swagger/swagger.json
2022/10/03 17:03:03 create swagger.yaml at swagger/swagger.yaml
go run .
2022/10/03 17:03:08 context.Background Listening on: :8080
Expectation
make install_deps && make swagger && make run
Screenshots
cf logs
Environment
- Device: laptop
- OS: macOS 11.7
- Browser: Firefox 115.0.1
- Version: Go 1.19.1