redoc

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexTpl

func IndexTpl(assetBase string, cfg *config.ReDoc) string

func WithUI

func WithUI(cfg ...config.ReDoc) specui.Option

WithUI configures the handler to use ReDoc, loading assets from CDN. An optional config.ReDoc value may be passed to customise the UI behaviour.

Types

type Data

type Data struct {
	Title               string `json:"title"`
	OpenAPIURL          string `json:"openapiURL"`
	HideDownloadButtons bool   `json:"hideDownloadButtons"`
	HideSearch          bool   `json:"hideSearch"`
	HideSchemaTitles    bool   `json:"hideSchemaTitles"`
}

type Handler

type Handler struct {
	Data
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(cfg *config.SpecUI) *Handler

NewHandler returns a HTTP handler for ReDoc.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL