Skip to content
Snippets Groups Projects
Commit e95dabb7 authored by Johan de Klerk's avatar Johan de Klerk
Browse files

Docs: Ignore tableName

parent 0840b09d
No related branches found
No related tags found
No related merge requests found
......@@ -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,7 +316,7 @@ 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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment