doc

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSpecNotFound = errors.New("spec not found")

ErrSpecNotFound error for when spec file not found

View Source
var HTML string

HTML represents the openapi-ui index.html page

View Source
var JavaScript string

JavaScript represents the openapi-ui umd javascript

Functions

This section is empty.

Types

type Doc

type Doc struct {
	DocsPath    string
	SpecPath    string
	SpecFile    string
	SpecFS      *embed.FS
	Title       string
	Description string
	Theme       string
}

Doc configuration

func (Doc) Body

func (r Doc) Body() ([]byte, error)

Body returns the final html with the js in the body

func (Doc) Handler

func (r Doc) Handler() http.HandlerFunc

Handler sets some defaults and returns a HandlerFunc

Jump to

Keyboard shortcuts

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