diff --git a/generate/swaggergen/g_docs.go b/generate/swaggergen/g_docs.go index da0968f..351a289 100644 --- a/generate/swaggergen/g_docs.go +++ b/generate/swaggergen/g_docs.go @@ -353,21 +353,21 @@ func analyseNewNamespace(ce *ast.CallExpr) (first string, others []ast.Expr) { func analyseNSInclude(baseurl string, ce *ast.CallExpr) string { cname := "" for _, p := range ce.Args { - var x *ast.SelectorExpr - var p1 interface{} = p - if ident, ok := p1.(*ast.Ident); ok { - if assign, ok := ident.Obj.Decl.(*ast.AssignStmt); ok { - if len(assign.Rhs) > 0 { - p1 = assign.Rhs[0].(*ast.UnaryExpr) - } - } - } - if _, ok := p1.(*ast.UnaryExpr); ok { - x = p1.(*ast.UnaryExpr).X.(*ast.CompositeLit).Type.(*ast.SelectorExpr) - } else { - beeLogger.Log.Warnf("Couldn't determine type\n") - continue - } + var x *ast.SelectorExpr + var p1 interface{} = p + if ident, ok := p1.(*ast.Ident); ok { + if assign, ok := ident.Obj.Decl.(*ast.AssignStmt); ok { + if len(assign.Rhs) > 0 { + p1 = assign.Rhs[0].(*ast.UnaryExpr) + } + } + } + if _, ok := p1.(*ast.UnaryExpr); ok { + x = p1.(*ast.UnaryExpr).X.(*ast.CompositeLit).Type.(*ast.SelectorExpr) + } else { + beeLogger.Log.Warnf("Couldn't determine type\n") + continue + } if v, ok := importlist[fmt.Sprint(x.X)]; ok { cname = v + x.Sel.Name } diff --git a/vendor/github.com/astaxie/beego/LICENSE b/vendor/github.com/astaxie/beego/LICENSE deleted file mode 100644 index 5dbd424..0000000 --- a/vendor/github.com/astaxie/beego/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2014 astaxie - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file diff --git a/vendor/github.com/astaxie/beego/swagger/swagger.go b/vendor/github.com/astaxie/beego/swagger/swagger.go index 89fef8a..a55676c 100644 --- a/vendor/github.com/astaxie/beego/swagger/swagger.go +++ b/vendor/github.com/astaxie/beego/swagger/swagger.go @@ -121,6 +121,8 @@ type Schema struct { Type string `json:"type,omitempty" yaml:"type,omitempty"` Items *Schema `json:"items,omitempty" yaml:"items,omitempty"` Properties map[string]Propertie `json:"properties,omitempty" yaml:"properties,omitempty"` + Enum []interface{} `json:"enum,omitempty" yaml:"enum,omitempty"` + Example interface{} `json:"example,omitempty" yaml:"example,omitempty"` } // Propertie are taken from the JSON Schema definition but their definitions were adjusted to the Swagger Specification @@ -130,7 +132,7 @@ type Propertie struct { Description string `json:"description,omitempty" yaml:"description,omitempty"` Default interface{} `json:"default,omitempty" yaml:"default,omitempty"` Type string `json:"type,omitempty" yaml:"type,omitempty"` - Example string `json:"example,omitempty" yaml:"example,omitempty"` + Example interface{} `json:"example,omitempty" yaml:"example,omitempty"` Required []string `json:"required,omitempty" yaml:"required,omitempty"` Format string `json:"format,omitempty" yaml:"format,omitempty"` ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` diff --git a/vendor/vendor.json b/vendor/vendor.json index 37ef0d8..52b43ba 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -3,10 +3,10 @@ "ignore": "test", "package": [ { - "checksumSHA1": "OeOvZ+3A1tRBdMD8GuS6R9zcnqA=", + "checksumSHA1": "/ffb74fNK251iTEebGjybfFBAbs=", "path": "github.com/astaxie/beego/swagger", - "revision": "323a1c4214101331a4b71922c23d19b7409ac71f", - "revisionTime": "2017-03-06T13:59:04Z" + "revision": "a09bafbf2ab483742b17bb352f95dbc0a597e720", + "revisionTime": "2018-07-21T07:55:28Z" }, { "checksumSHA1": "epd3Y7nD7QVzTW0ppwK+q4pKo/4=",