Documentation ¶
Index ¶
- func CustomWrapHandler(config *Config, handler *webdav.Handler) gin.HandlerFunc
- func DeepLinking(deepLinking bool) func(c *Config)
- func DefaultModelsExpandDepth(depth int) func(c *Config)
- func DisablingCustomWrapHandler(config *Config, h *webdav.Handler, envName string) gin.HandlerFunc
- func DisablingWrapHandler(h *webdav.Handler, envName string) gin.HandlerFunc
- func DocExpansion(docExpansion string) func(c *Config)
- func InstanceName(name string) func(c *Config)
- func PersistAuthorization(persistAuthorization bool) func(c *Config)
- func URL(url string) func(c *Config)
- func WrapHandler(h *webdav.Handler, confs ...func(c *Config)) gin.HandlerFunc
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomWrapHandler ¶ added in v1.4.31
func CustomWrapHandler(config *Config, handler *webdav.Handler) gin.HandlerFunc
CustomWrapHandler wraps `http.Handler` into `gin.HandlerFunc`
func DeepLinking ¶ added in v1.4.31
DeepLinking set the swagger deeplinking configuration
func DefaultModelsExpandDepth ¶ added in v1.4.31
DefaultModelsExpandDepth set the default expansion depth for models (set to -1 completely hide the models).
func DisablingCustomWrapHandler ¶ added in v1.4.31
DisablingCustomWrapHandler turn handler off if specified environment variable passed
func DisablingWrapHandler ¶ added in v1.4.31
func DisablingWrapHandler(h *webdav.Handler, envName string) gin.HandlerFunc
DisablingWrapHandler turn handler off if specified environment variable passed
func DocExpansion ¶ added in v1.4.31
DocExpansion list, full, none.
func InstanceName ¶ added in v1.4.31
InstanceName set the instance name that was used to generate the swagger documents. Defaults to swag.Name ("swagger").
func PersistAuthorization ¶ added in v1.4.31
If set to true, it persists authorization data and it would not be lost on browser close/refresh Defaults to false
func URL ¶ added in v1.4.31
URL presents the url pointing to API definition (normally swagger.json or swagger.yaml).
func WrapHandler ¶
func WrapHandler(h *webdav.Handler, confs ...func(c *Config)) gin.HandlerFunc
WrapHandler wraps `http.Handler` into `gin.HandlerFunc`.
Types ¶
type Config ¶ added in v1.4.31
type Config struct { //The url pointing to API definition (normally swagger.json or swagger.yaml). Default is `doc.json`. URL string DeepLinking bool DocExpansion string DefaultModelsExpandDepth int InstanceName string Title string PersistAuthorization bool }
Config stores ginSwagger configuration variables.
func (Config) ToSwaggerConfig ¶ added in v1.4.31
func (c Config) ToSwaggerConfig() swaggerConfig
Convert the config to a swagger one in order to fill unexposed template values.
Directories ¶
Path | Synopsis |
---|---|
example
|
|
basic/docs
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag
|
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag |
gzipped/docs
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag
|
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag |