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
As you can see the embedded pointer struct gets documented, as well as the header seperately. Even when hidden is true, and json is "-".
I can define the headers in my schema definition instead so that they could be reused across endpoints.. but I still need to be able to write the headers to the response anyway (which I need a struct for)? and since huma.register takes a context.Context rather than the huma.Context I'm struggling to see any way to write headers and have them documented correctly other than to duplicate the headers everywhere?
EDIT:
Have determined it works as expected IF the struct is embedded directly, instead of a pointer.
The text was updated successfully, but these errors were encountered:
So i'm trying to get my head around how I can utilise common headers in all my responses. I tried the following
This outputs the following in the docs:
As you can see the embedded pointer struct gets documented, as well as the header seperately. Even when hidden is true, and json is "-".
I can define the headers in my schema definition instead so that they could be reused across endpoints.. but I still need to be able to write the headers to the response anyway (which I need a struct for)? and since huma.register takes a context.Context rather than the huma.Context I'm struggling to see any way to write headers and have them documented correctly other than to duplicate the headers everywhere?
EDIT:
Have determined it works as expected IF the struct is embedded directly, instead of a pointer.
The text was updated successfully, but these errors were encountered: