package main
import (
"github.com/gin-gonic/gin"
"github.com/mvrilo/go-redoc"
ginredoc "github.com/mvrilo/go-redoc/gin"
)
func main() {
doc := redoc.Redoc{
Title: "Example API",
Description: "Example API Description",
SpecFile: "./openapi.yml",
SpecPath: "/openapi.yml",
DocsPath: "/docs",
}
r := gin.New()
r.Use(ginredoc.New(doc))
println("Documentation served at http://127.0.0.1:8000/docs")
panic(r.Run(":8000"))
}
When I run and visit http://172.28.73.58:8000/docs Page stuck in initialization (172.28.73.58 is my wsl2 ip)
And my gin run window has a warning message
[GIN-debug] [WARNING] Headers were already written. Wanted to override status code 404 with 200
Can you tell me how to solve it? thank
Hey everyone, sorry the delay here.
It seems that this issue was already fixed on master, it's just missing a new release - my bad.
I've just pushed a new tag, it should work fine now with v0.1.5.
Thanks for the report and help @ChnMig @lemonScaletech @hiranivipul
This is my test demo.
When I run and visit http://172.28.73.58:8000/docs Page stuck in initialization (172.28.73.58 is my wsl2 ip)
And my gin run window has a warning message
[GIN-debug] [WARNING] Headers were already written. Wanted to override status code 404 with 200
Can you tell me how to solve it? thank