swagger

package
v0.0.0-...-0ae262c Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) fiber.Handler

New 创建 Swagger 中间件(向后兼容,失败时会 panic) 这是一个便捷函数,适用于初始化阶段,错误表示程序配置有误

func NewWithError

func NewWithError(cfg Config) (fiber.Handler, error)

NewWithError 创建 Swagger 中间件,返回错误而非直接退出

Types

type Config

type Config struct {
	Title            string // 文档标题
	FilePath         string // 文档路径
	BasePath         string // 访问路径
	SwaggerBundleUrl string // swagger-ui-bundle.js地址
	SwaggerPresetUrl string // swagger-ui-preset.js地址
	SwaggerStylesUrl string // swagger-ui.css地址
}

Jump to

Keyboard shortcuts

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