swagger

package
v1.0.0-alpha.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSwaggerGen

func AddSwaggerGen(services di.IServiceCollection, configure ...func(*SwaggerGenOptions)) di.IServiceCollection

AddSwaggerGen adds Swagger generation services to the service collection. Corresponds to .NET services.AddSwaggerGen().

func UseSwagger

func UseSwagger(app *web.WebApplication)

UseSwagger enables the Swagger JSON endpoint. Corresponds to .NET app.UseSwagger().

func UseSwaggerUI

func UseSwaggerUI(app *web.WebApplication, configure ...func(*SwaggerUIOptions))

UseSwaggerUI enables the Swagger UI. Corresponds to .NET app.UseSwaggerUI().

Types

type SwaggerGenOptions

type SwaggerGenOptions struct {
	Title               string
	Version             string
	Description         string
	SecurityDefinitions map[string]openapi.SecurityScheme
}

SwaggerGenOptions configures Swagger generation.

func NewSwaggerGenOptions

func NewSwaggerGenOptions() *SwaggerGenOptions

NewSwaggerGenOptions creates a new SwaggerGenOptions with defaults.

func (*SwaggerGenOptions) AddSecurityDefinition

func (o *SwaggerGenOptions) AddSecurityDefinition(name string, scheme openapi.SecurityScheme)

AddSecurityDefinition adds a security scheme definition.

type SwaggerUIOptions

type SwaggerUIOptions struct {
	RoutePrefix string
	SpecURL     string
	Title       string
}

SwaggerUIOptions configures Swagger UI.

func NewSwaggerUIOptions

func NewSwaggerUIOptions() *SwaggerUIOptions

NewSwaggerUIOptions creates a new SwaggerUIOptions with defaults.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL