Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/codegen/agents/client/openapi_client/api_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@

from __future__ import annotations

from typing import TYPE_CHECKING, Generic, TypeVar
from typing import Generic, TypeVar

from pydantic import BaseModel, Field, StrictBytes, StrictInt

if TYPE_CHECKING:
from collections.abc import Mapping

T = TypeVar("T")


class ApiResponse(BaseModel, Generic[T]):
"""API response object"""

status_code: StrictInt = Field(description="HTTP status code")
headers: Mapping[str, str] | None = Field(None, description="HTTP headers")
headers: dict[str, str] | None = Field(None, description="HTTP headers")
data: T = Field(description="Deserialized data given the data type")
raw_data: StrictBytes = Field(description="Raw data (HTTP response body)")

Expand Down
Loading