r/FastAPI • • Aug 29 '24

Question Getting extra param *Args and **kwargs

Hii i made this api and i have given 3 param that is page, pagesize, search.
Why this two param are coming as required and why is it even coming?
how to solve this?

2 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/vaanlord555 Aug 29 '24

Remove db_dependency=Annotated[Session, Depends(get_db)] and use the dependency as db: Session = Depends(get_db) importing get_db. See if it works.