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
If using the IntoResponses derive macro, you cannot specify other response attributes besides status, although documentation says otherwise.
Example:
use utoipa::IntoResponses;#[derive(IntoResponses)]enumMyResponses{// this works#[response(status = NOT_FOUND)]#[allow(unused)]NotFound,// adding other attributes to response except status doesn't build// Error: expected identifier#[response(status = UNAUTHORIZED, example = json!({error:"not authorized"}))]NotAuthorized,}fnmain(){}
If using the
IntoResponses
derive macro, you cannot specify other response attributes besidesstatus
, although documentation says otherwise.Example:
Compilation fails with:
The text was updated successfully, but these errors were encountered: