Open erikborsos opened 4 months ago
Nice find, this is a bug as it should be treated as a string.
@danielgtaylor It looks like in the case of a slice of []*http.Cookie
, it is nesting into the cookie object. So it seems if we can stop nesting if it is a []*http.Cookie
type, that should resolve this issue.
I'm not familiar enough with the code that does the reflection to generate the schema in Huma right now since I'm fairly new to the project, so I'm not sure of the "best" way to accomplish this. I'm not sure if the right spot is to throw it into _findInType
, or if it belongs in a better spot.
I've noticed an issue (maybe it's a skill issue from my side) with how the docs page displays multiple cookies.
When only a single cookie is set as a result, everything appears fine in the UI. However, when multiple cookies are set, the UI doesn't seem to render it correctly (particularly in nesting).
Set single cookie:
Result:
Set multiple cookies:
Result:
I can't fold in the Set-Cookie object, which can be a bit confusing if there is more header information set.