Skip to content

Commit c2076ee

Browse files
committed
Handle pydantica validation for asset uri which can be None.
1 parent 614d919 commit c2076ee

File tree

4 files changed

+2
-4
lines changed

4 files changed

+2
-4
lines changed

airflow/api_fastapi/core_api/datamodels/assets.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class AssetEventResponse(BaseModel):
102102

103103
id: int
104104
asset_id: int
105-
uri: str | None = Field(alias="uri")
105+
uri: str | None = Field(alias="uri", default=None)
106106
extra: dict | None = None
107107
source_task_id: str | None = None
108108
source_dag_id: str | None = None

airflow/api_fastapi/core_api/openapi/v1-generated.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -6139,7 +6139,6 @@ components:
61396139
required:
61406140
- id
61416141
- asset_id
6142-
- uri
61436142
- source_map_index
61446143
- created_dagruns
61456144
- timestamp

airflow/ui/openapi-gen/requests/schemas.gen.ts

-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ export const $AssetEventResponse = {
256256
required: [
257257
"id",
258258
"asset_id",
259-
"uri",
260259
"source_map_index",
261260
"created_dagruns",
262261
"timestamp",

airflow/ui/openapi-gen/requests/types.gen.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export type AssetEventCollectionResponse = {
6060
export type AssetEventResponse = {
6161
id: number;
6262
asset_id: number;
63-
uri: string | null;
63+
uri?: string | null;
6464
extra?: {
6565
[key: string]: unknown;
6666
} | null;

0 commit comments

Comments
 (0)