Skip to content

Commit

Permalink
generated datamodel-codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
jx2lee committed Dec 17, 2024
1 parent 7e95d16 commit 0419c2b
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions task_sdk/src/airflow/sdk/api/datamodels/_generated.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# generated by datamodel-codegen:
# filename: http://0.0.0.0:9091/execution/openapi.json
# version: 0.26.3
# version: 0.26.4

from __future__ import annotations

Expand All @@ -26,7 +26,7 @@
from typing import Annotated, Any, Literal
from uuid import UUID

from pydantic import BaseModel, ConfigDict, Field
from pydantic import BaseModel, ConfigDict, Field, RootModel


class ConnectionResponse(BaseModel):
Expand Down Expand Up @@ -69,6 +69,10 @@ class IntermediateTIState(str, Enum):
DEFERRED = "deferred"


class JsonValue(RootModel[Any]):
root: Any


class TIDeferredStatePayload(BaseModel):
"""
Schema for updating TaskInstance to a deferred state.
Expand Down Expand Up @@ -144,6 +148,9 @@ 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 +160,9 @@ 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 +205,9 @@ 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 0419c2b

Please sign in to comment.