You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OnAddOperation can panic here if one of the fields of a return type is an embedded struct (there might be a requirement that the embedded struct also has some methods on it)
Panics with
panic: reflect: embedded type with methods not implemented if type is not first field
The text was updated successfully, but these errors were encountered:
Apparently this is a long-standing known issue in Go: golang/go#15924. It's unclear right now if it can be worked around since it's a problem with the underlying language support for reflection.
In the meantime, you can use pointer method receivers or disable the transformer:
config:=huma.DefaultConfig("My API", "1.0.0")
config.CreateHooks= []func(Config) Config{}
// api := ... use config ...
I wonder if it's possible to catch the issue, and not render the schema link for specific objects that suffer from this issue? Or is there an alterantive mechanism to construct the schema links?
OnAddOperation
can panic here if one of the fields of a return type is an embedded struct (there might be a requirement that the embedded struct also has some methods on it)Panics with
The text was updated successfully, but these errors were encountered: