Replies: 1 comment
-
Actually this is my end goal to have a support for at least partially to the default responses for
I am hoping to get these implemented asap, but this needs some amount of testing because of it requires deeper undestanding of internals of framework at hand and that is a bit time consuming. |
Beta Was this translation helpful? Give feedback.
-
My team is using
actix_default_responder::JsonResponder
from https://github.com/jsam/actix-default-responder because it allows our Rust docs to explicitly (and clearly) state what the HTTP response value is.This return type should be easily consumed by utoipa to automatically pre-populate the
responses
for the '20x' case.We haven't adopted the utoipa
IntoResponse
because it would force us to push all of the errors into a utoipa compliant error system, and also means the return value doesnt directly link to the struct of the returned response.While our approach works for us, and we're actix only, perhaps there is a middle ground where utoipa provides
actix-default-responder
-like solution that is generic, meaning it only handles the 20x side of theResult
, with a simple attribute to indicate which 20x to use.Just an idea as I see #589 and #582 improving
IntoResponse
and I am wishing we were able to use these lovely features... ;-)Beta Was this translation helpful? Give feedback.
All reactions