Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

Integrate with fastapi openapi authentication #10

@xtrm0

Description

@xtrm0

Is there a way to make this middleware correctly integrate with the openapi generators from fastapi?
For instance. Currently, this:

@router.get("/me", response_model=schemas.User)
@requires('user')
async def read_user_me(request: Request, db: Session = Depends(get_db)):
  user = User.get_user(db, request.user.userid)
  return user

Is not detected by fastapi's openapi generator as an authenticated endpoint. Is there a way to make this library integrate correctly with the openapi generator.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions