diff --git a/api_documentation/api_documentation.go b/api_documentation/api_documentation.go index 74b78823c6f8a52601dd01e0ec5349aca8820a70..6468275ec9af787858309091e7d1a7d3e68a4fa2 100644 --- a/api_documentation/api_documentation.go +++ b/api_documentation/api_documentation.go @@ -192,8 +192,13 @@ func FillParameters(docs *Docs, handler handler_utils.Handler) ([]DocParam, erro return nil, err } + name := StructFieldName(structField) + if name == "tableName" { + continue + } + parameter := DocParam{ - Name: StructFieldName(structField), + Name: name, In: "query", Description: structField.Tag.Get("doc"), Schema: schema, @@ -311,14 +316,14 @@ func StructSchema(docs *Docs, t reflect.Type) (interface{}, error) { if fieldName == "" { fieldName = f.Name } - if fieldName == "-" { + if fieldName == "-" || fieldName == "tableName" { continue // json does not marshal these } fieldName = strings.Replace(fieldName, ",omitempty", "", -1) var err error fieldDesc := f.Tag.Get("doc") - if fieldDesc == "-" { + if fieldDesc == "-" { continue } if fieldDesc == "" {