Skip to content

Commit f4a9668

Browse files
committed
0.35.0
1 parent 83e70b6 commit f4a9668

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ generate: install-generator ## Generate the SDK from our public openapi spec
2828
-o ./generated \
2929
--additional-properties=packageName=groundlight_openapi_client
3030
# strict-nullable makes nullable fields Optional in the generated Pydantic classes: https://github.com/koxudaxi/datamodel-code-generator/issues/327
31-
poetry run datamodel-codegen --input spec/public-api.yaml --output generated/model.py --strict-nullable --use-schema-description --output-model-type pydantic_v2.BaseModel --use-subclass-enum
31+
poetry run datamodel-codegen --input spec/public-api.yaml --output generated/model.py --strict-nullable --use-schema-description --output-model-type pydantic_v2.BaseModel --use-subclass-enum --output-datetime-class datetime
3232
poetry run black .
3333

3434
PYTEST=poetry run pytest -v

generated/model.py

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

55
from __future__ import annotations
66

@@ -486,16 +486,16 @@ class LabelValueRequest(BaseModel):
486486

487487

488488
class PaginatedDetectorList(BaseModel):
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")
489+
count: int = Field(..., examples=[123])
490+
next: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=4"])
491+
previous: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=2"])
492492
results: List[Detector]
493493

494494

495495
class PaginatedImageQueryList(BaseModel):
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")
496+
count: int = Field(..., examples=[123])
497+
next: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=4"])
498+
previous: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=2"])
499499
results: List[ImageQuery]
500500

501501

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

553553

554554
class PaginatedRuleList(BaseModel):
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")
555+
count: int = Field(..., examples=[123])
556+
next: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=4"])
557+
previous: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=2"])
558558
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.23.0"
27+
datamodel-code-generator = "^0.35.0"
2828
pre-commit = "^2.0.0"
2929
pytest = "^7.0.1"
3030
pytest-cov = "^3.0.0"

0 commit comments

Comments
 (0)