Documentation ¶
Index ¶
Constants ¶
View Source
const CustomThemeCSS = `` /* 2343-byte string literal not displayed */
View Source
const DefaultCDN = "https://cdn.jsdelivr.net/npm/@scalar/api-reference"
Variables ¶
This section is empty.
Functions ¶
func ApiReferenceHTML ¶
Types ¶
type CustomOptions ¶
type CustomOptions struct {
PageTitle string `json:"pageTitle,omitempty"`
}
type Options ¶
type Options struct { CDN string `json:"cdn,omitempty"` Theme ThemeId `json:"theme,omitempty"` Layout ReferenceLayoutType `json:"layout,omitempty"` SpecURL string `json:"specUrl,omitempty"` // allow external URL ou local path file SpecContent interface{} `json:"specContent,omitempty"` Proxy string `json:"proxy,omitempty"` IsEditable bool `json:"isEditable,omitempty"` ShowSidebar bool `json:"showSidebar,omitempty"` HideModels bool `json:"hideModels,omitempty"` HideDownloadButton bool `json:"hideDownloadButton,omitempty"` DarkMode bool `json:"darkMode,omitempty"` SearchHotKey string `json:"searchHotKey,omitempty"` MetaData string `json:"metaData,omitempty"` HiddenClients []string `json:"hiddenClients,omitempty"` CustomCss string `json:"customCss,omitempty"` Authentication string `json:"authentication,omitempty"` PathRouting string `json:"pathRouting,omitempty"` BaseServerURL string `json:"baseServerUrl,omitempty"` WithDefaultFonts bool `json:"withDefaultFonts,omitempty"` CustomOptions }
func DefaultOptions ¶
DefaultOptions configures the default settings for API Reference options
type ReferenceLayoutType ¶
type ReferenceLayoutType string
ReferenceLayoutType represents different layout options
const ( LayoutModern ReferenceLayoutType = "modern" LayoutClassic ReferenceLayoutType = "classic" )
type ThemeId ¶
type ThemeId string
Define ThemeId as a type based on string for theme identification
const ( ThemeDefault ThemeId = "default" ThemeAlternate ThemeId = "alternate" ThemeMoon ThemeId = "moon" ThemePurple ThemeId = "purple" ThemeSolarized ThemeId = "solarized" ThemeBluePlanet ThemeId = "bluePlanet" ThemeDeepSpace ThemeId = "deepSpace" ThemeSaturn ThemeId = "saturn" ThemeKepler ThemeId = "kepler" ThemeMars ThemeId = "mars" ThemeNone ThemeId = "none" ThemeNil ThemeId = "" )
Click to show internal directories.
Click to hide internal directories.