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
im trying to integrate astra to my existing gin based backend, this is part of my router setup
r.GET("/", func(c *gin.Context) {
c.String(http.StatusOK, fmt.Sprint(time.Now().Unix()))
})
apiRouterNoAuth := r.Group("/api/admin")
apiRouterNoAuth.POST("/login", admin.APILogin)
apiRouterNoAuth.POST("/register", admin.APIRegister)
apiRouterNoAuth.GET("/healthcheck", APIHealthCheck)
aRouter := r.Group("/api/admin")
aRouter.Use(middleware.AuthMiddlewareHeader())
aRouter.GET("/logout", admin.APILogout)
...
...
gen := astra.New(inputs.WithGinInput(r), outputs.WithOpenAPIOutput("openapi.generated.yaml"))
// For OpenAPI to work, we need to define a configuration, which contains the title, version and description amongst other important information
config := astra.Config{
Title: "Example API",
Version: "1.0.0",
Host: "localhost",
Port: 8001,
}
gen.SetConfig(&config)
err := gen.Parse()
if err != nil {
log.Println("error parsing astra...", err)
// panic(err)
}
}
Actual Behavior
2024/02/28 15:34:44 main.go:54: current os : darwin
2024/02/28 15:34:44 main.go:80: duration for session is 10 ....30
3:34PM INF Begin parsing
3:34PM INF Setting up parse
3:34PM INF Setting up
3:34PM INF Creating temp dir
3:34PM INF Creating temp dir complete
3:34PM INF Noting current dir
3:34PM INF Noting current dir complete
3:34PM INF Setting up complete
3:34PM INF Creating routes from inputs
3:34PM INF Creating routes from input mode=gin
3:34PM ERR Failed to get relative path error="Rel: can't make relative to /Users/avar/mybackend" handler=avar/internal/handler/Admin.(*AdminController).APIGetPaidOrders-fm method=GET path=/api/admin/dashboard/orders-count
3:34PM ERR Failed to parse route error="Rel: can't make relative to /Users/avar/mybackend" file= line=1 method=GET path=/api/admin/dashboard/orders-count
3:34PM ERR Error creating routes from input error="Rel: can't make relative to /Users/avar/mybackend" mode=gin
3:34PM ERR Error creating routes from inputs error="Rel: can't make relative to /Users/avar/mybackend"
3:34PM ERR Error setting up parse error="Rel: can't make relative to /Users/avar/mybackend"
2024/02/28 15:34:44 router.go:295: error parsing astra... Rel: can't make relative to /Users/avar/mybackend
2024/02/28 15:34:44 main.go:134: not using secure connection
Additional Information
Go Version: 1.21.7 darwin/amd64
Go Toolchain: 1.21
Astra Version: go get -u github.com/ls6-events/astra
The text was updated successfully, but these errors were encountered:
@avary Thanks for using Astra and submitting an issue, I think it might be a duplicate of #55 which we are working on a fix for and we will let you know when it's sorted.
Issue Description
im trying to integrate astra to my existing gin based backend, this is part of my router setup
Actual Behavior
Additional Information
The text was updated successfully, but these errors were encountered: