Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions fiberoapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,11 @@ func generateSchema(t reflect.Type) map[string]interface{} {
continue
}

// Skip fields that are path or query parameters - they are handled separately
if field.Tag.Get("path") != "" || field.Tag.Get("query") != "" {
continue
}

// Get JSON tag name
jsonTag := field.Tag.Get("json")
if jsonTag == "-" {
Expand Down Expand Up @@ -602,13 +607,6 @@ func generateSchema(t reflect.Type) map[string]interface{} {
}
}

// Add description from path/query tags
if pathTag := field.Tag.Get("path"); pathTag != "" {
fieldSchema["description"] = "Path parameter: " + pathTag
} else if queryTag := field.Tag.Get("query"); queryTag != "" {
fieldSchema["description"] = "Query parameter: " + queryTag
}

properties[fieldName] = fieldSchema
}

Expand Down
Loading