Skip to content

Commit

Permalink
Skip def name for a func type that may return different schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
vearutop committed Mar 6, 2024
1 parent ee6e1be commit c32d392
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,10 @@ func (r *Reflector) defName(rc *ReflectContext, t reflect.Type) string {
return ""
}

if t.Kind() == reflect.Func {
return ""

Check warning on line 689 in reflect.go

View check run for this annotation

Codecov / codecov/patch

reflect.go#L689

Added line #L689 was not covered by tests
}

Check notice on line 690 in reflect.go

View workflow job for this annotation

GitHub Actions / test (1.22.x)

1 statement(s) on lines 688:690 are not covered by tests.

if r.defNameTypes == nil {
r.defNameTypes = map[string]reflect.Type{}
}
Expand Down

0 comments on commit c32d392

Please sign in to comment.