Skip to content

Commit

Permalink
Handle pydantica validation for asset uri which can be None.
Browse files Browse the repository at this point in the history
  • Loading branch information
tirkarthi committed Dec 16, 2024
1 parent 614d919 commit c2076ee
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion airflow/api_fastapi/core_api/datamodels/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class AssetEventResponse(BaseModel):

id: int
asset_id: int
uri: str | None = Field(alias="uri")
uri: str | None = Field(alias="uri", default=None)
extra: dict | None = None
source_task_id: str | None = None
source_dag_id: str | None = None
Expand Down
1 change: 0 additions & 1 deletion airflow/api_fastapi/core_api/openapi/v1-generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6139,7 +6139,6 @@ components:
required:
- id
- asset_id
- uri
- source_map_index
- created_dagruns
- timestamp
Expand Down
1 change: 0 additions & 1 deletion airflow/ui/openapi-gen/requests/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ export const $AssetEventResponse = {
required: [
"id",
"asset_id",
"uri",
"source_map_index",
"created_dagruns",
"timestamp",
Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/openapi-gen/requests/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export type AssetEventCollectionResponse = {
export type AssetEventResponse = {
id: number;
asset_id: number;
uri: string | null;
uri?: string | null;
extra?: {
[key: string]: unknown;
} | null;
Expand Down

0 comments on commit c2076ee

Please sign in to comment.