Documentation ¶
Index ¶
Constants ¶
View Source
const (
// DefaultPath is root path docs will be served up unless configured differently
DefaultPath = "/docs"
)
Variables ¶
View Source
var ( // ErrServeMuxMustNotBeNil error ErrServeMuxMustNotBeNil = errors.New("openapi: serve mux can not be nil") // ErrJSONDataMustNotBeNil error ErrJSONDataMustNotBeNil = errors.New("openapi: JSON data can not be nil") )
Functions ¶
This section is empty.
Types ¶
type OpenAPI ¶
type OpenAPI struct { Spec spec.Swagger Schemes []string Path string // contains filtered or unexported fields }
OpenAPI holds the basic config and mux
func (*OpenAPI) AddSecurityScheme ¶
func (s *OpenAPI) AddSecurityScheme(name string, scheme spec.SecurityScheme)
AddSecurityScheme is a helper to add security schemes such as OAuth2, etc.
Click to show internal directories.
Click to hide internal directories.