Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapHandler ¶
func WrapHandler(cfg Config) gin.HandlerFunc
Types ¶
type Config ¶
type Config struct {
// URL of the JSON read by the UI (e.g., "/docs/openapi.json")
SpecURL string
// Display title
Title string
// Settings for dark/light mode, etc. (extendable to match scalar options)
Theme string // e.g., "none" / "dark" / "light"
// Path to the pre-generated file (use either one)
SpecFilePath string
// Used when dynamically returning JSON
SpecProvider func() ([]byte, error)
}
func DefaultConfig ¶
func DefaultConfig() Config
Click to show internal directories.
Click to hide internal directories.