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 ¶
SwaggerUIOptions configures Swagger UI.
func NewSwaggerUIOptions ¶
func NewSwaggerUIOptions() *SwaggerUIOptions
NewSwaggerUIOptions creates a new SwaggerUIOptions with defaults.
Click to show internal directories.
Click to hide internal directories.