im trying to pass a new description to the include_router, but it doesn`t accept [description="description"].
Below you see the selfdefined working route with a custom description.
from fastapi import Depends
from sqlalchemy import select
from fastapi import APIRouter, FastAPI
from app.schemas.schemas import UserRead
from app.routes.permissions import admin_route
from sqlalchemy.ext.asyncio import AsyncSession
from app.schemas.schemas import UserCreate, UserUpdate
from app.models.users import auth_backend, fastapi_users
from app.databases.user import User, get_async_session
test = APIRouter()
test.include_router(
fastapi_users.get_users_router(UserRead, UserUpdate),
prefix="users",
tags=["stuff"],
)
@test.get("users", response_model=list[UserRead], tags=["stuff"], description="description")
async def method(session: AsyncSession = Depends(get_async_session)):
statement = select(User)
result = await session.execute(statement)
return result.scalars().all()
Is there a way to change the standard routes behavoir in fastapi-users, without altering the plugins code?
Thanks for help.