updating github.com/emicklei/go-restful to v2.9.5+incompatible

This commit is contained in:
Davanum Srinivas
2019-06-14 10:50:10 -04:00
parent 8d6848ada1
commit 453eac7c08
36 changed files with 514 additions and 211 deletions

View File

@@ -60,7 +60,7 @@ func reflectTypeName(sample interface{}) string {
func (w *WebService) compilePathExpression() {
compiled, err := newPathExpression(w.rootPath)
if err != nil {
log.Printf("[restful] invalid path:%s because:%v", w.rootPath, err)
log.Printf("invalid path:%s because:%v", w.rootPath, err)
os.Exit(1)
}
w.pathExpr = compiled
@@ -118,7 +118,7 @@ func (w *WebService) QueryParameter(name, description string) *Parameter {
// QueryParameter creates a new Parameter of kind Query for documentation purposes.
// It is initialized as not required with string as its DataType.
func QueryParameter(name, description string) *Parameter {
p := &Parameter{&ParameterData{Name: name, Description: description, Required: false, DataType: "string"}}
p := &Parameter{&ParameterData{Name: name, Description: description, Required: false, DataType: "string", CollectionFormat: CollectionFormatCSV.String()}}
p.beQuery()
return p
}
@@ -233,7 +233,7 @@ func (w *WebService) RootPath() string {
return w.rootPath
}
// PathParameters return the path parameter names for (shared amoung its Routes)
// PathParameters return the path parameter names for (shared among its Routes)
func (w *WebService) PathParameters() []*Parameter {
return w.pathParameters
}