Documentation ¶
Index ¶
- func New(title, swaggerJSONPath string, basePath string) http.Handler
- func NewWithOption(handlerOpts ...HandlerOption) http.Handler
- func RegisterSwaggerUIServer[T httpServerInterface](srv T, title, swaggerJSONPath string, basePath string)
- func RegisterSwaggerUIServerWithOption[T httpServerInterface](srv T, handlerOpts ...HandlerOption)
- type Handler
- type HandlerOption
- func WithBasePath(path string) HandlerOption
- func WithHideCurl(hide bool) HandlerOption
- func WithJsonEditor(enable bool) HandlerOption
- func WithLocalFile(filePath string) HandlerOption
- func WithMemoryData(data []byte, ext string) HandlerOption
- func WithPreAuthorizeApiKey(keys map[string]string) HandlerOption
- func WithRemoteFile(filePath string) HandlerOption
- func WithSettingsUI(settings map[string]string) HandlerOption
- func WithShowTopBar(show bool) HandlerOption
- func WithTitle(title string) HandlerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWithOption ¶
func NewWithOption(handlerOpts ...HandlerOption) http.Handler
NewWithOption creates configurable handler constructor.
func RegisterSwaggerUIServer ¶
func RegisterSwaggerUIServerWithOption ¶
func RegisterSwaggerUIServerWithOption[T httpServerInterface](srv T, handlerOpts ...HandlerOption)
Types ¶
type HandlerOption ¶
func WithJsonEditor ¶
func WithJsonEditor(enable bool) HandlerOption
WithJsonEditor Enable visual json editor support (experimental, can fail with complex schemas).
func WithLocalFile ¶
func WithLocalFile(filePath string) HandlerOption
func WithMemoryData ¶
func WithMemoryData(data []byte, ext string) HandlerOption
func WithPreAuthorizeApiKey ¶
func WithPreAuthorizeApiKey(keys map[string]string) HandlerOption
WithPreAuthorizeApiKey Map of security name to key value
func WithRemoteFile ¶
func WithRemoteFile(filePath string) HandlerOption
WithRemoteFile URL to openapi.json/swagger.json document specification.
func WithSettingsUI ¶
func WithSettingsUI(settings map[string]string) HandlerOption
WithSettingsUI 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.
func WithShowTopBar ¶
func WithShowTopBar(show bool) HandlerOption
WithShowTopBar Show navigation top bar, hidden by default.
Click to show internal directories.
Click to hide internal directories.