Files
realy/openapi/main.go
mleku bbebbe2b02 Add tracing with lol.Tracer in multiple functions.
Introduced `lol.Tracer` for function entry/exit logging across various packages. This improves traceability and debugging of function executions while preserving existing behavior. Removed unused files `doc.go` and `nothing.go` to clean up the repository.
2025-06-29 07:32:24 +01:00

26 lines
581 B
Go

package openapi
import (
"github.com/danielgtaylor/huma/v2"
"realy.lol/lol"
"realy.lol/realy/interfaces"
"realy.lol/servemux"
)
type Operations struct {
interfaces.Server
path string
*servemux.S
}
// New creates a new openapi.Operations and registers its methods.
func New(s interfaces.Server, name, version, description string, path string,
sm *servemux.S) {
lol.Tracer("New", name, version, description, path)
defer func() { lol.Tracer("end New") }()
a := NewHuma(sm, name, version, description)
huma.AutoRegister(a, &Operations{Server: s, path: path})
return
}