swagger

package module
v0.0.0-...-a465f2f Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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(instanceName string) func(c *Config)

InstanceName specified swag instance name

func New

func New(configFns ...func(c *Config)) forest.HandlerFunc

New wraps `http.Handler` into `forest.HandlerFunc`.

func PersistAuthorization

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

If set to true, it persists authorization data and it would not be lost on browser close/refresh Defaults to false

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
	DeepLinking          bool
	DocExpansion         string
	DomID                string
	InstanceName         string
	PersistAuthorization bool
}

Config stores configuration variables.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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