We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when i run 'swag init', no api info has been generated in swagger.json
swag.exe version v1.16.3 go version go1.22.1 windows/amd64 i use the examples provided on the official website and filled in the correct package name.
package main import ( "net/http" docs "oj/docs" "github.com/gin-gonic/gin" swaggerfiles "github.com/swaggo/files" ginSwagger "github.com/swaggo/gin-swagger" ) // @BasePath /api/v1 // PingExample godoc // @Summary ping example // @Schemes // @Description do ping // @Tags example // @Accept json // @Produce json // @Success 200 {string} Helloworld // @Router /example/helloworld [get] func Helloworld(g *gin.Context) { g.JSON(http.StatusOK, "helloworld") } func main() { r := gin.Default() docs.SwaggerInfo.BasePath = "/api/v1" v1 := r.Group("/api/v1") { eg := v1.Group("/example") { eg.GET("/helloworld", Helloworld) } } r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerfiles.Handler)) r.Run(":8080") }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
when i run 'swag init', no api info has been generated in swagger.json
swag.exe version v1.16.3
go version go1.22.1 windows/amd64
i use the examples provided on the official website and filled in the correct package name.
The text was updated successfully, but these errors were encountered: