Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Commit 5cee692

Browse files
author
Phil Varner
authored
Merge branch 'main' into pv/order-and-status-pluralization
2 parents 32b97ab + da22d32 commit 5cee692

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ none
1414
### Changed
1515

1616
- Create Order endpoint from `.../order` to `.../orders`
17+
- Order field `id` must be a string, instead of previously allowing int. This is because while an
18+
order ID may an integral numeric value, it is not a "number" in the sense that math will be performed
19+
order ID values, so string represents this better.
1720

1821
### Deprecated
1922

src/stapi_fastapi/models/order.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
BaseModel,
99
ConfigDict,
1010
Field,
11-
StrictInt,
1211
StrictStr,
1312
)
1413

@@ -75,7 +74,7 @@ class OrderProperties(BaseModel):
7574
class Order(Feature[Geometry, OrderProperties]):
7675
# We need to enforce that orders have an id defined, as that is required to
7776
# retrieve them via the API
78-
id: StrictInt | StrictStr
77+
id: StrictStr
7978
type: Literal["Feature"] = "Feature"
8079
links: list[Link] = Field(default_factory=list)
8180

0 commit comments

Comments
 (0)