utoipa icon indicating copy to clipboard operation
utoipa copied to clipboard

Namespaced body in responses

Open RemiKalbe opened this issue 2 years ago • 1 comments

Same issue as https://github.com/juhaku/utoipa/issues/152 but with body in responses

#[utoipa::path(
    responses(
        (status = 200, body = response::WillNotWork),
    ),
)]

Tried on master.

RemiKalbe avatar Jun 12 '22 15:06 RemiKalbe

Response body and request body is resolved in elsewhere thus not supporting path expression. This needs a change to current implementation. I'll note this to the project's kanban board as well.

juhaku avatar Jun 12 '22 16:06 juhaku

From #408 the types of response body and request body are parsed with the same logic as types of the ToSchema and IntoParams structs are. This should allow defining types with paths similarly.

juhaku avatar Dec 11 '22 15:12 juhaku