Documentation ¶
Index ¶
- Variables
- func DeepLinking(deepLinking bool) func(*Config)
- func DocExpansion(docExpansion string) func(*Config)
- func DomID(domID string) func(*Config)
- func EchoWrapHandler(options ...func(*Config)) echo.HandlerFunc
- func InstanceName(instanceName string) func(*Config)
- func OAuth(config *OAuthConfig) func(*Config)
- func PersistAuthorization(persistAuthorization bool) func(*Config)
- func SyntaxHighlight(syntaxHighlight bool) func(*Config)
- func URL(url string) func(*Config)
- type Config
- type OAuthConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var WrapHandler = EchoWrapHandler()
WrapHandler wraps swaggerFiles.Handler and returns echo.HandlerFunc
Functions ¶
func DeepLinking ¶ added in v1.1.2
DeepLinking true, false.
func DocExpansion ¶ added in v1.1.2
DocExpansion list, full, none.
func EchoWrapHandler ¶
func EchoWrapHandler(options ...func(*Config)) echo.HandlerFunc
EchoWrapHandler wraps `http.Handler` into `echo.HandlerFunc`.
func InstanceName ¶ added in v1.1.5
InstanceName specified swag instance name.
func OAuth ¶ added in v1.3.3
func OAuth(config *OAuthConfig) func(*Config)
func PersistAuthorization ¶ added in v1.3.0
PersistAuthorization Persist authorization information over browser close/refresh. Defaults to false.
func SyntaxHighlight ¶ added in v1.3.5
SyntaxHighlight true, false.
Types ¶
type Config ¶
type Config struct { // The url pointing to API definition (normally swagger.json or swagger.yaml). Default is `mockedSwag.json`. URLs []string DocExpansion string DomID string InstanceName string DeepLinking bool PersistAuthorization bool SyntaxHighlight bool // The information for OAuth2 integration, if any. OAuth *OAuthConfig }
Config stores echoSwagger configuration variables.
type OAuthConfig ¶ added in v1.3.3
type OAuthConfig struct { // The ID of the client sent to the OAuth2 IAM provider. ClientId string // The OAuth2 realm that the client should operate in. If not applicable, use empty string. Realm string // The name to display for the application in the authentication popup. AppName string }
OAuthConfig stores configuration for Swagger UI OAuth2 integration. See https://swagger.io/docs/open-source-tools/swagger-ui/usage/oauth2/ for further details.
Click to show internal directories.
Click to hide internal directories.