Skip to content

Commit b1971cd

Browse files
author
Phil Varner
committed
change numberMatched not to be an alias
1 parent 95e2a03 commit b1971cd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stapi-fastapi/src/stapi_fastapi/routers/root_router.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ async def get_orders( # noqa: C901
287287
return OrderCollection(
288288
features=orders,
289289
links=links,
290-
number_matched=orders_count,
290+
numberMatched=orders_count,
291291
)
292292

293293
async def get_order(self, order_id: str, request: Request) -> Order[OrderStatus]:

stapi-pydantic/src/stapi_pydantic/order.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class OrderCollection(_GeoJsonBase, Generic[T]):
129129
type: Literal["FeatureCollection"] = "FeatureCollection"
130130
features: list[Order[T]]
131131
links: list[Link] = Field(default_factory=list)
132-
number_matched: int | None = Field(serialization_alias="numberMatched", exclude_if=lambda v: v is None)
132+
numberMatched: int | None = Field(default=None, exclude_if=lambda x: x is None)
133133

134134
def __iter__(self) -> Iterator[Order[T]]: # type: ignore [override]
135135
"""iterate over features"""

0 commit comments

Comments
 (0)