Documentation
¶
Overview ¶
Package uiopt holds the option machinery shared by the bundled UI sub-packages (ui/scalar, ui/swaggerui, ui/redoc, ui/stoplight and their embedded twins). It is internal: only stdocs's own UI packages import it. Each UI package re-exports Option as its own UIOption type and Configuration as its own WithConfiguration, so the wiring lives in one place while the public API stays per-package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Merge ¶
Merge overlays over onto a copy of base, with over winning on key conflicts (a shallow, top-level merge). UI sub-packages use it to apply their CSP-safe defaults while letting a caller's WithConfiguration override any key. It returns nil when the result is empty, so a UI with no defaults and no caller config renders no configuration carrier and stays byte-identical to the unconfigured page.
Types ¶
type Option ¶
type Option func(*Settings)
Option mutates Settings.
func Configuration ¶
Configuration is the shared implementation of every UI's WithConfiguration: it records the configuration map for the UI to render into its docs page.