File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
openapi_core/contrib/starlette Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change 1
1
from aioitertools .itertools import tee as atee
2
2
from starlette .requests import Request
3
3
from starlette .responses import Response
4
- from starlette .responses import StreamingResponse
5
4
6
5
from openapi_core .contrib .starlette .requests import StarletteOpenAPIRequest
7
6
from openapi_core .contrib .starlette .responses import StarletteOpenAPIResponse
@@ -24,7 +23,7 @@ async def get_openapi_response(
24
23
) -> StarletteOpenAPIResponse :
25
24
assert self .response_cls is not None
26
25
data = None
27
- if isinstance (response , StreamingResponse ):
26
+ if hasattr (response , "body_iterator" ):
28
27
body_iter1 , body_iter2 = atee (response .body_iterator )
29
28
response .body_iterator = body_iter2
30
29
data = b"" .join (
You can’t perform that action at this time.
0 commit comments