Skip to content

Commit

Permalink
fix: compatibility with fastapi 0.115.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jvllmr committed Oct 12, 2024
1 parent df8eb99 commit d03b21f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fastapi
Submodule fastapi updated 705 files
4 changes: 3 additions & 1 deletion src/fastapi_deferred_init/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d03b21f

Please sign in to comment.