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" )
View Source
const (
OptionNoBody = "-"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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
// contains filtered or unexported fields
}
func (*Param) SetByAnnotation ¶ added in v0.2.2
func (p *Param) SetByAnnotation(a *annotation)
Set sets properties according to the given annotation.
type Specification ¶
type Specification struct {
Operations []*Operation
}
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.