Skip to content

Documenting middleware-handled responses globally #1522

Description

@sajvn0x

I’m using utoipa with Actix Web and have authentication/session logic handled in middleware (example. unauthorized, revoked session, expired token, etc...)
At the moment I’m manually adding middleware-related responses (401, 403, etc) to each #[utoipa::path], which becomes repetitive

I’m wondering:
• Is there a supported way to document middleware-handled responses globally?
• Or a way to extend/inherit common responses into multiple routes?
• Or any existing patterns for reusable response sets?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions