forked from lazada/swgui
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathconfig.go
22 lines (18 loc) · 1.17 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package swgui
// Config is used for Swagger UI handler configuration.
type Config struct {
Title string `json:"title"` // Title of index file.
SwaggerJSON string `json:"swaggerJsonUrl"` // URL to openapi.json/swagger.json document specification.
BasePath string `json:"basePath"` // Base URL to docs.
// InternalBasePath is used to override BasePath if external
// url differs from internal one.
InternalBasePath string `json:"-"`
ShowTopBar bool `json:"showTopBar"` // Show navigation top bar, hidden by default.
HideCurl bool `json:"hideCurl"` // Hide curl code snippet.
JsonEditor bool `json:"jsonEditor"` // Enable visual json editor support (experimental, can fail with complex schemas).
PreAuthorizeApiKey map[string]string `json:"preAuthorizeApiKey"` // Map of security name to key value.
// SettingsUI contains keys and plain javascript values of SwaggerUIBundle configuration.
// Overrides default values.
// See https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/ for available options.
SettingsUI map[string]string `json:"-"`
}