rapidoc

package
v0.32.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(opts *Opts, next http.Handler) http.Handler

Handler creates a middleware to serve a documentation site for a swagger spec. This allows for altering the spec before starting the http listener.

Types

type Opts

type Opts struct {
	// BasePath for the UI path, defaults to: / .
	BasePath string
	// Path combines with BasePath for the full UI path, defaults to: docs.
	Path string
	// SpecURL the url to find the spec for.
	SpecURL string
	// RapiDocURL for the js that generates the rapidoc site, defaults to: https://cdn.jsdelivr.net/npm/rapidoc/bundles/rapidoc.standalone.js .
	RapiDocURL string
	// Title for the documentation site, default to: API documentation.
	Title string
}

Opts configures the RapiDoc middlewares.

func (*Opts) EnsureDefaults

func (r *Opts) EnsureDefaults()

EnsureDefaults in case some options are missing.

Jump to

Keyboard shortcuts

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