Browse Source
Fixes #15401: SSE stream_item_type was not copied from source routes to merged routes when using APIRouter + include_router. The stream detection branch in APIRoute.__init__ only runs when response_model is a DefaultPlaceholder. After include_router copies route.response_model (which is already None), the branch is skipped and stream_item_type stays None. Now explicitly copy stream_item_type and stream_item_field from source route to the merged route after add_api_route creates it.pull/15544/head
1 changed files with 5 additions and 0 deletions
Loading…
Reference in new issue