Skip to content

Query parameter models work incorrectly if fastapi-pagination enabled (FastAPI >= 0.115.0) #1314

@espdev

Description

@espdev

Hello,

In FastAPI 0.115.0 query parameter models functionality has been added. If we use fastapi-pagination (add_pagination(app)) this feature works incorrectly.

For example:

class QueryFilters(BaseModel):
    foo: int | None = None
    bar: str | None = None
    baz: str | None = None

@app.get('/api')
async def api(filters: Annotated[QueryFilters, Query()]):
    return {}

Without add_pagination:
image

With add_pagination:
image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions