Documentation ¶
Index ¶
- Constants
- func GetDescriptionFromDoc(doc []string) string
- func ParseMetadata(doc []string) (*spec.Metadata, error)
- func ParseParamOptions(argName, s string) ([]*spec.Parameter, error)
- func ParseSuccess(s string, method *ifacetool.Method) (*spec.Response, error)
- type Aliases
- type Body
- type InterfaceAnnotation
- type Manipulation
- type MethodAnnotation
- type Op
- type Param
Constants ¶
View Source
const (
OptionNoBody = "-"
)
Variables ¶
This section is empty.
Functions ¶
func GetDescriptionFromDoc ¶
func ParseSuccess ¶
ParseSuccess parses s per the format as below:
statusCode=<statusCode> body=<body> manip=`<manipulation> [; <manipulation2> [; ...]]`
The format of `<manipulation>`:
<argName> name=<name> type=<type> descr=<descr>
Types ¶
type Aliases ¶
type Body ¶
type Body struct { Field string Manipulations map[string]*Manipulation }
type InterfaceAnnotation ¶
func ParseInterfaceAnnotation ¶
func ParseInterfaceAnnotation(doc []string) (*InterfaceAnnotation, error)
type Manipulation ¶
type MethodAnnotation ¶
type MethodAnnotation struct { Ops []*Op Params map[string]*Param Body *Body Success *spec.Response Tags []string }
func ParseMethodAnnotation ¶
func ParseMethodAnnotation(method *ifacetool.Method, aliases Aliases) (*MethodAnnotation, error)
type Param ¶
func ParseParams ¶
ParseParams parses s per the format as below:
<argName> [<parameter> [, <parameter2> [, ...]]]
The format of `<parameter>`:
in=<in> name=<name> required=<required> type=<type> descr=<descr>
Multiple bindings can be specified in a single semicolon-separated comment.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.