local-server/vendor/github.com/emicklei/go-restful-openapi/lookup.go

20 lines
427 B
Go
Raw Normal View History

2019-02-04 02:56:43 +00:00
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 ""
}