diff --git a/faststream/__about__.py b/faststream/__about__.py index eab078d518..f773a18c49 100644 --- a/faststream/__about__.py +++ b/faststream/__about__.py @@ -1,5 +1,5 @@ """Simple and fast framework to create message brokers based microservices.""" -__version__ = "0.5.21" +__version__ = "0.5.22" SERVICE_NAME = f"faststream-{__version__}" diff --git a/faststream/broker/fastapi/_compat.py b/faststream/broker/fastapi/_compat.py index d65d34ba14..206aff52ef 100644 --- a/faststream/broker/fastapi/_compat.py +++ b/faststream/broker/fastapi/_compat.py @@ -16,6 +16,7 @@ FASTAPI_V2 = major > 0 or minor > 100 FASTAPI_V106 = major > 0 or minor >= 106 FASTAPI_v102_3 = major > 0 or minor > 112 or (minor == 112 and patch > 2) +FASTAPI_v102_4 = major > 0 or minor > 112 or (minor == 112 and patch > 3) __all__ = ( "create_response_field", @@ -56,6 +57,8 @@ def raise_fastapi_validation_error(errors: List[Any], body: AnyDict) -> Never: create_model_field as create_response_field, ) + extra = {"embed_body_fields": False} if FASTAPI_v102_4 else {} + async def solve_faststream_dependency( request: "Request", dependant: "Dependant", @@ -67,6 +70,7 @@ async def solve_faststream_dependency( body=request._body, # type: ignore[arg-type] dependant=dependant, dependency_overrides_provider=dependency_overrides_provider, + **extra, # type: ignore[arg-type] **kwargs, ) values, errors, background = ( diff --git a/pyproject.toml b/pyproject.toml index 723c6b55e2..95ff6c47bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -128,7 +128,7 @@ test-core = [ testing = [ "faststream[test-core]", - "fastapi==0.112.3", + "fastapi==0.113.0", "pydantic-settings>=2.0.0,<3.0.0", "httpx==0.27.2", "PyYAML==6.0.2",