pierrejeambrun commented on code in PR #47440:
URL: https://github.com/apache/airflow/pull/47440#discussion_r1984969521
##########
airflow/api_fastapi/core_api/routes/public/dags.py:
##########
@@ -95,7 +95,7 @@ def get_dags(
),
],
order_by: Annotated[
- SortParam,
+ list[str],
Review Comment:
I think the original type is more accurate.
##########
airflow/api_fastapi/common/parameters.py:
##########
@@ -224,9 +243,9 @@ def get_primary_key_string(self) -> str:
def depends(cls, *args: Any, **kwargs: Any) -> Self:
raise NotImplementedError("Use dynamic_depends, depends not
implemented.")
- def dynamic_depends(self, default: str | None = None) -> Callable:
- def inner(order_by: str = default or self.get_primary_key_string()) ->
SortParam:
- return self.set_value(self.get_primary_key_string() if order_by ==
"" else order_by)
+ def dynamic_depends(self, default: list[str] | None = None) -> Callable:
+ def inner(order_by: list[str] = Query(default or
self.get_primary_key_string())) -> SortParam:
Review Comment:
You'll need to adjust the or close. it needs to return a `list[str]`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]