Documentation ¶
Index ¶
Constants ¶
View Source
const ( InPath = "path" InQuery = "query" InHeader = "header" InCookie = "cookie" InBody = "body" // This flag indicates that the parameter is located in *http.Request. InRequest = "request" MediaTypeJSON = "application/json; charset=utf-8" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Operation ¶
type Param ¶
type Param struct { Name string // Method argument name Type string // Method argument type RawType types.Type // The raw Go type of the method argument In string Alias string // Request parameter name AliasType string // Request parameter type Required bool Description string // OAS description IsBlank bool // Whether this parameter is a blank identifier. // contains filtered or unexported fields }
func (*Param) SetByAnnotation ¶
func (p *Param) SetByAnnotation(a *annotation)
Set sets properties according to the given annotation.
func (*Param) SetDescription ¶
type Specification ¶
func Spec ¶
func Spec() *Specification
func (*Specification) Path ¶
func (s *Specification) Path(pattern string, operations ...*Operation) *Specification
Click to show internal directories.
Click to hide internal directories.