Added swager docs

This commit is contained in:
2026-04-02 22:55:01 +02:00
parent 6e7aa21c40
commit 59fb96cc26
9 changed files with 2991 additions and 21 deletions
+9
View File
@@ -1,11 +1,20 @@
package fiberconfig
import (
"github.com/Flussen/swagger-fiber-v3"
"github.com/gofiber/fiber/v3"
"github.com/gofiber/fiber/v3/middleware/logger"
"github.com/gofiber/fiber/v3/middleware/static"
)
func Setup(app *fiber.App) {
app.Get("/api/docs.json", static.New("./docs/swagger.json"))
app.Get("/api/swagger/*", swagger.New(swagger.Config{
URL: "/api/docs.json",
Title: "mcheads.net API Documentation",
}))
app.Use("/api", func(c fiber.Ctx) error {
c.Set("Content-Type", "application/json")
return c.Next()