diff --git a/huma.go b/huma.go index 709e1a73..8b545775 100644 --- a/huma.go +++ b/huma.go @@ -439,7 +439,7 @@ func _findInType[T comparable](t reflect.Type, path []int, result *findResult[T] result.Paths = append(result.Paths, findResultPath[T]{fi, v}) } } - if f.Anonymous || recurseFields || deref(f.Type).Kind() != reflect.Struct { + if f.Anonymous || recurseFields || deref(f.Type).Kind() != reflect.Struct || f.Tag.Get("recursive") == "true" { // Always process embedded structs and named fields which are not // structs. If `recurseFields` is true then we also process named // struct fields recursively.