mirror of https://github.com/tiangolo/fastapi.git
parent
57ac6ee1ce
commit
628f64d0c7
|
|
@ -979,9 +979,7 @@ class APIRoute(routing.Route):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_json_stream(self) -> bool:
|
def is_json_stream(self) -> bool:
|
||||||
return self.is_generator and isinstance(
|
return self.is_generator and isinstance(self.response_class, DefaultPlaceholder)
|
||||||
self.response_class, DefaultPlaceholder
|
|
||||||
)
|
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def _flat_dependant(self) -> Dependant:
|
def _flat_dependant(self) -> Dependant:
|
||||||
|
|
@ -1013,7 +1011,6 @@ class APIRoute(routing.Route):
|
||||||
_ = self.response_fields
|
_ = self.response_fields
|
||||||
_ = self.stream_item_field
|
_ = self.stream_item_field
|
||||||
|
|
||||||
|
|
||||||
def get_route_handler(self) -> Callable[[Request], Coroutine[Any, Any, Response]]:
|
def get_route_handler(self) -> Callable[[Request], Coroutine[Any, Any, Response]]:
|
||||||
return get_request_handler(
|
return get_request_handler(
|
||||||
dependant=self.dependant,
|
dependant=self.dependant,
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ deferred_keys = [
|
||||||
"response_fields",
|
"response_fields",
|
||||||
"body_field",
|
"body_field",
|
||||||
"response_field",
|
"response_field",
|
||||||
|
"stream_item_field",
|
||||||
"dependant",
|
"dependant",
|
||||||
"_flat_dependant",
|
"_flat_dependant",
|
||||||
"_embed_body_fields",
|
"_embed_body_fields",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue