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
In #1071 I see you added auto collection of tuple responses for utoipa::path if the responses are tuple-style (i.e. responses((status = 200, description = "200", body = FooStruct)), but that IntoResponses-style (i.e. responses(FooStruct)) is not supported.
What happens is that if the response is a struct with named fields has nested structs (with their own respective ToSchema implementations), there will be hanging $refs that are not included. My current workaround is to force inlining with #[schema(inline)] on these fields, but I'd much prefer if the $refs were automatically collected
Is this a misuse/misunderstanding of IntoResponses? Or will rescursive and automatic components/$ref collection be implemented for IntoResponses in the future?
Thanks again!
The text was updated successfully, but these errors were encountered:
Hi, thanks for all the hard work on
utoipa
!In #1071 I see you added auto collection of tuple responses for
utoipa::path
if the responses are tuple-style (i.e.responses((status = 200, description = "200", body = FooStruct))
, but thatIntoResponses
-style (i.e.responses(FooStruct)
) is not supported.What happens is that if the response is a struct with named fields has nested structs (with their own respective
ToSchema
implementations), there will be hanging$ref
s that are not included. My current workaround is to force inlining with#[schema(inline)]
on these fields, but I'd much prefer if the$refs
were automatically collectedIs this a misuse/misunderstanding of
IntoResponses
? Or will rescursive and automatic components/$ref
collection be implemented forIntoResponses
in the future?Thanks again!
The text was updated successfully, but these errors were encountered: