Skip to content

Commit

Permalink
Fix default inference from an unexported field (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
vearutop committed Mar 7, 2024
1 parent a631dc6 commit 45ef3c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion request/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ func (df *DecoderFactory) makeDefaultDecoder(input interface{}, m *decoder) {

if d, ok := sf.Tag.Lookup(defaultTag); ok { //nolint:nestif
defaults[key] = []string{d}
} else if df.JSONSchemaReflector != nil {
} else if df.JSONSchemaReflector != nil && v.CanInterface() {
vi := v.Interface()

s, err := df.JSONSchemaReflector.Reflect(vi)
Expand Down

0 comments on commit 45ef3c6

Please sign in to comment.