diff --git a/fastapi b/fastapi index bde12fa..07684ae 160000 --- a/fastapi +++ b/fastapi @@ -1 +1 @@ -Subproject commit bde12faea20313e4570f7cb896c201058c26e546 +Subproject commit 07684aea793d042fb5a12dde46dfe6d1e2196725 diff --git a/src/fastapi_deferred_init/routing.py b/src/fastapi_deferred_init/routing.py index d26ceff..cafbb90 100644 --- a/src/fastapi_deferred_init/routing.py +++ b/src/fastapi_deferred_init/routing.py @@ -173,7 +173,9 @@ def response_fields(self) -> dict[Union[int, str], ModelField]: additional_status_code ), f"Status code {additional_status_code} must not have a response body" response_name = f"Response_{additional_status_code}_{self.unique_id}" - response_field = create_model_field(name=response_name, type_=model) + response_field = create_model_field( + name=response_name, type_=model, mode="serialization" + ) response_fields[additional_status_code] = response_field return response_fields