swagger

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WrapHandler = RoutingWrapHandler()

WrapHandler wraps swaggerFiles.Handler and returns echo.HandlerFunc

Functions

func DeepLinking

func DeepLinking(deepLinking bool) func(c *Config)

DeepLinking true, false.

func DocExpansion

func DocExpansion(docExpansion string) func(c *Config)

DocExpansion list, full, none.

func DomID

func DomID(domID string) func(c *Config)

DomID #swagger-ui.

func InstanceName

func InstanceName(name string) func(*Config)

InstanceName set the instance name that was used to generate the swagger documents Defaults to swag.Name ("swagger").

func PersistAuthorization

func PersistAuthorization(persistAuthorization bool) func(c *Config)

PersistAuthorization Persist authorization information over browser close/refresh. Defaults to false.

func RoutingWrapHandler

func RoutingWrapHandler(configFns ...func(c *Config)) routing.Handler

FiberWrapHandler wraps `http.Handler` into `fiber.Handler`.

func URL

func URL(url string) func(c *Config)

URL presents the url pointing to API definition (normally swagger.json or swagger.yaml).

Types

type Config

type Config struct {
	// The url pointing to API definition (normally swagger.json or swagger.yaml). Default is `mockedSwag.json`.
	URL                  string
	InstanceName         string
	DocExpansion         string
	DomID                string
	DeepLinking          bool
	PersistAuthorization bool
}

Config stores echoSwagger configuration variables.

Jump to

Keyboard shortcuts

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