Skip to content

Commit

Permalink
moving datamodels to assets
Browse files Browse the repository at this point in the history
  • Loading branch information
amoghrajesh committed Nov 15, 2024
1 parent c1a7eed commit 8301a1b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
15 changes: 15 additions & 0 deletions airflow/api_fastapi/core_api/datamodels/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,18 @@ class AssetEventCollectionResponse(BaseModel):

asset_events: list[AssetEventResponse]
total_entries: int


class QueuedEventResponse(BaseModel):
"""Queued Event serializer for responses.."""

uri: str
dag_id: str
created_at: datetime


class QueuedEventCollectionResponse(BaseModel):
"""Queued Event Collection serializer for responses."""

queued_events: list[QueuedEventResponse]
total_entries: int
15 changes: 0 additions & 15 deletions airflow/api_fastapi/core_api/datamodels/dags.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,18 +159,3 @@ class DAGTagCollectionResponse(BaseModel):

tags: list[str]
total_entries: int


class QueuedEventResponse(BaseModel):
"""Queued Event serializer for responses.."""

uri: str
dag_id: str
created_at: datetime


class QueuedEventCollectionResponse(BaseModel):
"""Queued Event Collection serializer for responses."""

queued_events: list[QueuedEventResponse]
total_entries: int
3 changes: 1 addition & 2 deletions airflow/api_fastapi/core_api/routes/public/dags.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,13 @@
SortParam,
)
from airflow.api_fastapi.common.router import AirflowRouter
from airflow.api_fastapi.core_api.datamodels.assets import QueuedEventCollectionResponse, QueuedEventResponse
from airflow.api_fastapi.core_api.datamodels.dags import (
DAGCollectionResponse,
DAGDetailsResponse,
DAGPatchBody,
DAGResponse,
DAGTagCollectionResponse,
QueuedEventCollectionResponse,
QueuedEventResponse,
)
from airflow.api_fastapi.core_api.openapi.exceptions import create_openapi_http_exception_doc
from airflow.api_fastapi.core_api.routes.public.assets import _generate_queued_event_where_clause
Expand Down

0 comments on commit 8301a1b

Please sign in to comment.