Documentation
¶
Overview ¶
Package swagger provides Swagger UI support for Rig. This is a separate package to keep the core Rig framework dependency-free.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Swagger ¶
type Swagger struct {
// contains filtered or unexported fields
}
Swagger provides Swagger UI serving capabilities.
func NewFromSwag ¶
NewFromSwag creates a Swagger UI server using swaggo/swag's registered spec. The instanceName is typically "swagger" unless you registered a custom name. Requires importing your generated docs package: _ "myapp/docs"
func (*Swagger) Register ¶
Register registers Swagger UI routes at the given path prefix. Example: s.Register(router, "/docs") serves UI at /docs/
func (*Swagger) RegisterGroup ¶
func (s *Swagger) RegisterGroup(g *rig.RouteGroup, pathPrefix string)
RegisterGroup registers Swagger UI routes on a route group. Example: s.RegisterGroup(apiGroup, "/docs") serves UI at /api/docs/
func (*Swagger) WithDeepLinking ¶
WithDeepLinking enables or disables deep linking in Swagger UI. When enabled, the URL updates as you navigate the documentation. Default: true
func (*Swagger) WithDocExpansion ¶
WithDocExpansion sets the default expansion mode for operations. Valid values: "list" (default), "full", "none"