swagger

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 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

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地址
}

type Docs

type Docs struct {
	Swagger string `json:"swagger"`
	Info    struct {
		Title   string `json:"title"`
		Version string `json:"version"`
	}
	Consumes []string `json:"consumes"`
	Produces []string `json:"produces"`
	Paths    map[string]map[string]struct {
		Summary     string   `json:"summary"`
		OperationId string   `json:"operationId"`
		Tags        []string `json:"tags"`
	} `json:"paths"`
}
var Doc Docs

Jump to

Keyboard shortcuts

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