20 lines
427 B
Go
20 lines
427 B
Go
|
package restfulspec
|
||
|
|
||
|
import restful "github.com/emicklei/go-restful"
|
||
|
|
||
|
func asParamType(kind int) string {
|
||
|
switch {
|
||
|
case kind == restful.PathParameterKind:
|
||
|
return "path"
|
||
|
case kind == restful.QueryParameterKind:
|
||
|
return "query"
|
||
|
case kind == restful.BodyParameterKind:
|
||
|
return "body"
|
||
|
case kind == restful.HeaderParameterKind:
|
||
|
return "header"
|
||
|
case kind == restful.FormParameterKind:
|
||
|
return "formData"
|
||
|
}
|
||
|
return ""
|
||
|
}
|