Skip to content

Commit 83e70b6

Browse files
committed
datamodel-code-generator 0.23.0
1 parent 4cb869c commit 83e70b6

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

generated/model.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# generated by datamodel-codegen:
22
# filename: public-api.yaml
3-
# timestamp: 2025-10-20T16:50:10+00:00
3+
# timestamp: 2025-10-20T17:20:11+00:00
44

55
from __future__ import annotations
66

7+
from datetime import datetime
78
from enum import Enum
89
from typing import Any, Dict, List, Optional, Union
910

10-
from pydantic import AnyUrl, AwareDatetime, BaseModel, Field, RootModel, confloat, conint, constr
11+
from pydantic import AnyUrl, BaseModel, Field, RootModel, confloat, conint, constr
1112

1213

1314
class AccountMonthToDateInfo(BaseModel):
@@ -183,7 +184,7 @@ class WebhookAction(BaseModel):
183184
payload_template: Optional[PayloadTemplate] = None
184185
last_message_failed: Optional[bool] = None
185186
last_failure_error: Optional[str] = None
186-
last_failed_at: Optional[AwareDatetime] = None
187+
last_failed_at: Optional[datetime] = None
187188

188189

189190
class WebhookActionRequest(BaseModel):
@@ -192,7 +193,7 @@ class WebhookActionRequest(BaseModel):
192193
payload_template: Optional[PayloadTemplateRequest] = None
193194
last_message_failed: Optional[bool] = None
194195
last_failure_error: Optional[str] = None
195-
last_failed_at: Optional[AwareDatetime] = None
196+
last_failed_at: Optional[datetime] = None
196197

197198

198199
class ResultType(Enum):
@@ -369,7 +370,7 @@ class Detector(BaseModel):
369370

370371
id: str = Field(..., description="A unique ID for this object.")
371372
type: DetectorTypeEnum = Field(..., description="The type of this object.")
372-
created_at: AwareDatetime = Field(..., description="When this detector was created.")
373+
created_at: datetime = Field(..., description="When this detector was created.")
373374
name: constr(max_length=200) = Field(..., description="A short, descriptive name for the detector.")
374375
query: str = Field(..., description="A question about the image.")
375376
group_name: str = Field(..., description="Which group should this detector be part of?")
@@ -438,7 +439,7 @@ class ImageQuery(BaseModel):
438439
metadata: Optional[Dict[str, Any]] = Field(..., description="Metadata about the image query.")
439440
id: str = Field(..., description="A unique ID for this object.")
440441
type: ImageQueryTypeEnum = Field(..., description="The type of this object.")
441-
created_at: AwareDatetime = Field(..., description="When was this detector created?")
442+
created_at: datetime = Field(..., description="When was this detector created?")
442443
query: str = Field(..., description="A question about the image.")
443444
detector_id: str = Field(..., description="Which detector was used on this image query?")
444445
result_type: ResultTypeEnum = Field(..., description="What type of result are we returning?")
@@ -472,7 +473,7 @@ class LabelValue(BaseModel):
472473
)
473474
rois: Optional[List[ROI]] = None
474475
annotations_requested: List[str]
475-
created_at: AwareDatetime
476+
created_at: datetime
476477
detector_id: Optional[int] = Field(...)
477478
source: str
478479
text: Optional[str] = Field(..., description="Text annotations")
@@ -485,16 +486,16 @@ class LabelValueRequest(BaseModel):
485486

486487

487488
class PaginatedDetectorList(BaseModel):
488-
count: int = Field(..., examples=[123])
489-
next: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=4"])
490-
previous: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=2"])
489+
count: int = Field(..., example=123)
490+
next: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=4")
491+
previous: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=2")
491492
results: List[Detector]
492493

493494

494495
class PaginatedImageQueryList(BaseModel):
495-
count: int = Field(..., examples=[123])
496-
next: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=4"])
497-
previous: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=2"])
496+
count: int = Field(..., example=123)
497+
next: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=4")
498+
previous: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=2")
498499
results: List[ImageQuery]
499500

500501

@@ -551,7 +552,7 @@ class RuleRequest(BaseModel):
551552

552553

553554
class PaginatedRuleList(BaseModel):
554-
count: int = Field(..., examples=[123])
555-
next: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=4"])
556-
previous: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=2"])
555+
count: int = Field(..., example=123)
556+
next: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=4")
557+
previous: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=2")
557558
results: List[Rule]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ typer = "^0.15.4"
2424
urllib3 = "^2.5.0"
2525

2626
[tool.poetry.group.dev.dependencies]
27-
datamodel-code-generator = "^0.25.0"
27+
datamodel-code-generator = "^0.23.0"
2828
pre-commit = "^2.0.0"
2929
pytest = "^7.0.1"
3030
pytest-cov = "^3.0.0"

0 commit comments

Comments
 (0)