Documentation ¶
Overview ¶
Package apidoc implements reflection based api documentation using the OpenAPI 2.0 specification (Swagger).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Documentation ¶
Documentation wraps the Swagger object of the spec Package.
func (*Documentation) Add ¶
func (doc *Documentation) Add(op *Operation) error
Add a new operation to the documentation.
func (*Documentation) SetApiKeyAuth ¶
func (doc *Documentation) SetApiKeyAuth(in, name string)
SetApiKeyAuth enables the global ApiKey security scheme.
type Info ¶
type Info struct { Host string Path string Title string Description string Schemes []string Version string }
Info holds basic API Information.
type Operation ¶
type Operation struct { // Method of this operation. Method string // Pattern of this operation. Pattern string // Tags in which this operation will be grouped. Tags []string // Description of the operation Description string // Unauthenticated set to true will disable all security defintions. Unauthenticated bool PathParams []PathParam QueryParams []QueryParam Input interface{} Output interface{} }
Operation represents an API Operation.
Click to show internal directories.
Click to hide internal directories.