Skip to content

Commit

Permalink
attr in task_sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
jx2lee committed Dec 17, 2024
1 parent 285d19f commit 65215a4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions task_sdk/src/airflow/sdk/api/datamodels/_generated.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class ConnectionResponse(BaseModel):
Connection schema for responses with fields that are needed for Runtime.
"""

model_config = ConfigDict(extra="forbid")

conn_id: Annotated[str, Field(title="Conn Id")]
conn_type: Annotated[str, Field(title="Conn Type")]
host: Annotated[str | None, Field(title="Host")] = None
Expand Down Expand Up @@ -144,6 +146,8 @@ class VariableResponse(BaseModel):
Variable schema for responses with fields that are needed for Runtime.
"""

model_config = ConfigDict(extra="forbid")

key: Annotated[str, Field(title="Key")]
value: Annotated[str | None, Field(title="Value")] = None

Expand All @@ -153,6 +157,8 @@ class XComResponse(BaseModel):
XCom schema for responses with fields that are needed for Runtime.
"""

model_config = ConfigDict(extra="forbid")

key: Annotated[str, Field(title="Key")]
value: Annotated[Any, Field(title="Value")]

Expand Down Expand Up @@ -195,6 +201,8 @@ class TIRunContext(BaseModel):
Response schema for TaskInstance run context.
"""

model_config = ConfigDict(extra="forbid")

dag_run: DagRun
variables: Annotated[list[VariableResponse] | None, Field(title="Variables")] = None
connections: Annotated[list[ConnectionResponse] | None, Field(title="Connections")] = None
Expand Down

0 comments on commit 65215a4

Please sign in to comment.